On Fri, Nov 29, 2013 at 4:49 PM, Adrian Chadd <adr...@freebsd.org> wrote:

> The reason I wouldn't implement this is to avoid having code that
> _relies_ on this behaviour in order to function or perform well.

nobody ever said (or could reasonably expect to do) that.

Applications don't know if the allocator overallocates,
so they have no hope unless they work even without the feature.

This is only about giving them an option to improve
performance in those (rare ?) cases where, as i showed,
knowing the underlying allocation size may lead to
better usage of memory.

> Heck, it may not even be portable to other operating systems. Except,
> Linux, I guess.
in userspace, as jb commented, all major OSes have it
(malloc_usable_size() on FreeBSD and Linux,
_msize() on Windows, malloc_size() on OSX).

In the kernel, I have no idea, but porting kernel code
across systems is a nightmare anyways...

freebsd-current@freebsd.org mailing list
To unsubscribe, send any mail to "freebsd-current-unsubscr...@freebsd.org"

Reply via email to