Date: Fri, 29 Nov 2013 20:37:28 -0800 From: Tim Kientzle <kientzle@freebsd.org> To: jb <jb.1234abcd@gmail.com> Cc: FreeBSD current <freebsd-current@freebsd.org> Subject: Re: [RFC] how to get the size of a malloc(9) block ? Message-ID: <8BCD215D-55D8-452F-AAFC-8BC07AEDB76C@freebsd.org> In-Reply-To: <loom.20131130T002152-608@post.gmane.org> References: <CA%2BhQ2%2BgK1pc_aS1LEKp29Bi=MHFtJCkw2uOrib_9wQ-7AziH=w@mail.gmail.com> <loom.20131130T002152-608@post.gmane.org>
next in thread | previous in thread | raw e-mail | index | archive | help
On Nov 29, 2013, at 3:44 PM, jb <jb.1234abcd@gmail.com> wrote: > Luigi Rizzo <rizzo <at> iet.unipi.it> writes: >=20 >> ...=20 >> There is a difference between applications peeking into >> implementation details that should be hidden, and providing >> instead limited and specific information through a well defined API. >> ... >=20 > Right. >=20 > If you want to improve memory management, that is, have the system = (kernel > or user space) handle memory reallocation intelligently and = transparently > to the user, then aim at a well defined API: Don=92t forget: * Request a block of =93at least N bytes=94 and have the allocator tell you what it *really* allocated. This allows applications to use memory more efficiently by taking advantage of over-allocation when it happens. Tim
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?8BCD215D-55D8-452F-AAFC-8BC07AEDB76C>