Date: Thu, 10 Jan 2008 11:04:00 +0100 From: =?utf-8?Q?Dag-Erling_Sm=C3=B8rgrav?= <des@des.no> To: Peter Schuller <peter.schuller@infidyne.com> Cc: Andrew Reilly <andrew-freebsd@areilly.bpc-users.org>, Peter Jeremy <peterjeremy@optushome.com.au>, Poul-Henning Kamp <phk@phk.freebsd.dk>, freebsd-current@freebsd.org, Igor Mozolevsky <igor@hybrid-lab.co.uk>, Kostik Belousov <kostikbel@gmail.com> Subject: Re: sbrk(2) broken Message-ID: <863at6j8tr.fsf@ds4.des.no> In-Reply-To: <200801091922.56670.peter.schuller@infidyne.com> (Peter Schuller's message of "Wed\, 9 Jan 2008 19\:22\:47 %2B0100") References: <15094.1199751424@critter.freebsd.dk> <200801080237.40379.peter.schuller@infidyne.com> <86tzlonozc.fsf@ds4.des.no> <200801091922.56670.peter.schuller@infidyne.com>
next in thread | previous in thread | raw e-mail | index | archive | help
Peter Schuller <peter.schuller@infidyne.com> writes: > Dag-Erling Sm=C3=B8rgrav <des@des.no> writes: > > 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. > However, in this context it will likely only help partially since you sti= ll > 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 mal= loc > will align all allocations to pages, or the overhead would be extreme). Page-aligning every allocation would be supremely stupid, and jemalloc does so only for allocations larger than a page. DES --=20 Dag-Erling Sm=C3=B8rgrav - des@des.no
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?863at6j8tr.fsf>