Andres Kroonmaa wrote:
> Good place used to be exactly after memDataInit() call in mem.c:memInit()
> As good place should be after CREATE_CBDATA() in cbdata.c:cbdataInit() ??
Only covers a small fraction of the cbdata types. Most are registered
dynamically using the macro CBDATA_INIT_TYPE().
> Why we need small chunks? To avoid having pools with single chunk of 16K?
> Even if we had 100 pools with single item, we'd waste only 1.6M.
Yes, exactly why. But I see your point.
> Dynamic is not easy. I can't find a clean way how to change chunk size
> after some allocations have been serviced.
> But perhaps we could even shrink the chunk if we notice that it never
> exceeds few simultaneous allocations.
Haven't looked at how you track the chunks, but I cannot imagine it to
be very hard to increase the chunk size when more chunks are required.
Of course you cannot change the size of already allocated chunks, but
this should not matter very much, except that free needs to know to
search for chunks smaller than the current granulatiry.
/Henrik
Received on Fri Mar 30 2001 - 07:38:45 MST
This archive was generated by hypermail pre-2.1.9 : Tue Dec 09 2003 - 16:13:42 MST