Date: Fri, 04 Jan 2008 13:28:39 +0000 From: "Poul-Henning Kamp" <phk@phk.freebsd.dk> To: Andrey Chernov <ache@nagual.pp.ru> Cc: freebsd-current@FreeBSD.ORG, Jason Evans <jasone@FreeBSD.ORG> Subject: Re: sbrk(2) broken Message-ID: <5974.1199453319@critter.freebsd.dk> In-Reply-To: Your message of "Fri, 04 Jan 2008 16:12:47 %2B0300." <20080104131247.GA17816@nagual.pp.ru>
next in thread | previous in thread | raw e-mail | index | archive | help
In message <20080104131247.GA17816@nagual.pp.ru>, Andrey Chernov writes: >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. No we don't. Find a book that explains how Virtual Memory works. -- Poul-Henning Kamp | UNIX since Zilog Zeus 3.20 phk@FreeBSD.ORG | TCP/IP since RFC 956 FreeBSD committer | BSD since 4.3-tahoe Never attribute to malice what can adequately be explained by incompetence.
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?5974.1199453319>