Adrian Chadd wrote:
> FreeBSD's malloc does page-align requests over a certain size. Feel free to
> try optimising the memPool stuff. :-)
Are you sure?
Well, Linux and dlmalloc doesn't anyway. It aligns larger allocations to
"page boundary + a fixed offset". This is because larger allocations is
done using mmap(). mmap() both reduces the fragmentation and allows the
library to return the memory to the OS when freed.
> Remember that the MemPool code is very basic and there's a lot
> of room for improvement.
Yes, there indeed is room for improvement.
One quite obvious one is to do batch allocations. This will save quite a
bit of memory on most malloc implementations. Problem is that it does
not go well together with idle limits.
/Henrik
Received on Mon Sep 25 2000 - 14:06:46 MDT
This archive was generated by hypermail pre-2.1.9 : Tue Dec 09 2003 - 16:12:38 MST