sbrk(2) broken

Andrey Chernov ache at nagual.pp.ru
Fri Jan 4 05:12:50 PST 2008


On Fri, Jan 04, 2008 at 12:57:11PM +0000, Poul-Henning Kamp wrote:
> There is address space allocated to the process (via sbrk/mmap)
> 
> A subset of this, is address space allocated by the program (via malloc)
> 
> ...and then there is memory actually in use, which is an entirely different
> thing, of which we currently only have some kind of clue in the VM
> system.

Then, we need sysctl to fetch that "memory actually in use" from the 
kernel and compare that with getrlimit() which allows malloc() to return 
0 when needed.

-- 
http://ache.pp.ru/


More information about the freebsd-current mailing list