[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: luac and loadstring hang
- From: Enrico Colombini <erix@...>
- Date: Mon, 16 Nov 2009 18:12:50 +0100
Luiz Henrique de Figueiredo wrote:
"We learned that malloc should return NULL in case of out-of-memory.
However, it is not the case in Linux. By default, Linux uses
optimistic memory allocation strategy. Under this strategy,
Linux assumes there always exists free memory. The memory region
returns by malloc is not actually allocated until the process
touches the memory region. This means the memory region returns
by malloc may not be available. In case of out-of-memory, the
OOM Killer in Linux will pick up one or more process to kill."
The number of things one learns just by reading this list is amazing!
Today I've already been surprised twice :-)