On 30 Mar 2001, at 11:09, Henrik Nordstrom <hno@hem.passagen.se> wrote:
> Andres Kroonmaa wrote:
>
> > I decided to sort chunks in ram based on pointer value, so that all mem
> > used tends to compact the heap over time. Always pick chunk closest to
> > heap start. Idle chunks are released if not touched for some time, or
> > if over memory_pools_limit. Chunk size is variable depending on item
> > size.
>
> How large chunks are you using?
16 min, 256K max.
> At least for Linux malloc() you might want to change this criteria for
> the larger pools. Any allocations of 128KB or more is done outside the
> heap, making sorting on address irrelevant. Can be tuned to use a lower
> limit, or done manually using mmap() to allocate the chunks.
yes, probably sorting by address isn't worth then. It still gives
indirect benefit, because I have a chunk chain sorted, easier to find
chunk with frees, and it kind of happens that chunks most filled get
filled first.
------------------------------------
Andres Kroonmaa <andre@online.ee>
CTO, Delfi Online
Tel: 6501 731, Fax: 6501 708
Pärnu mnt. 158, Tallinn,
11317 Estonia
Received on Fri Mar 30 2001 - 03:18:33 MST
This archive was generated by hypermail pre-2.1.9 : Tue Dec 09 2003 - 16:13:41 MST