Robert William Fuller wrote:
> Linux doesn't commit mapped memory until it's faulted.  As for other 
> platforms, who knows?

Correction: most Linux installations don't commit mapped memory until
it's faulted.  A few do, as a matter of policy (it depends on kernel
settings), so that applications won't randomly crash when too much
memory is faulted, but will return 0 from malloc() earlier.

For those few systems, use MAP_NORESERVE if you still need to allocate
the address space.

-- Jamie


Reply via email to