ASU - out of memory?

Carsten Haitzler (The Rasterman) raster at
Mon Aug 25 03:07:56 CEST 2008

On Fri, 22 Aug 2008 12:36:52 -0400 "Chris Wright" <dhasenan at> babbled:

> On the other hand, let's say your process allocates some memory and
> doesn't use it for a while. In the meantime, some memory is freed.
> This doesn't help if malloc() returned null, but it does help if the
> kernel overcommitted memory instead.
> I don't think that's as useful. But you could instead define a malloc:
> void* _malloc(size_t length)
> {
>    void* pointer = malloc(length);
>    if (!mlock(pointer, length)) return null; // or abort
>    return pointer;
> }

unfortunately... this isn't practical. only root can mlock(). sure. on om we
run all as root - but that is something that probably should change and is not
a sane solution. :)

Carsten Haitzler (The Rasterman) <raster at>

More information about the community mailing list