Re: sbrk(2) broken

From: Peter Schuller <peter.schuller_at_infidyne.com>
Date: Wed, 9 Jan 2008 19:22:47 +0100
> Actually, malloc(3) can use madvise(2) to notify the kernel that
> arbitrary pages in the arena are unused and can be discarded.  The
> current implementation will do so if the H option is specified.

Ah, interesting. I was not aware of that.

However, in this context it will likely only help partially since you still 
need a full page to be free (and with a lot of programs many allocations will 
be significantly smaller than that, and I have to assume no real-life malloc 
will align all allocations to pages, or the overhead would be extreme).

-- 
/ Peter Schuller

PGP userID: 0xE9758B7D or 'Peter Schuller <peter.schuller_at_infidyne.com>'
Key retrieval: Send an E-Mail to getpgpkey_at_scode.org
E-Mail: peter.schuller_at_infidyne.com Web: http://www.scode.org


Received on Wed Jan 09 2008 - 17:22:46 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:39:25 UTC