[erlang-questions] eheap_alloc crash when using mnesia
Tue Oct 21 10:07:13 CEST 2008
On Mon, Oct 20, 2008 at 9:56 PM, Matthew Dempsky <> wrote:
> I'd love to see a more elegant solution for out-of-memory conditions,
> but it seems difficult to recover from without explicit memory
> allocation. E.g., in C, you can check whether malloc(3) failed and
> then fail gracefully, making sure your error handling code doesn't
> need to allocate additional memory. (Stack space is still implicitly
> allocated, but I've never heard this to be a problem, except with
> runaway recursive programs and kernel programming where the stack
> space is more limited.)
Beware! With modern kernels it is no longer true that malloc always
fails if you run out of memory. Often you'll find it crashes upon
access of the allocated memory rather than on the call to malloc().
I'll need to dig out the references.
More information about the erlang-questions