On Wed, May 2, 2018 at 11:22 AM, Duy Nguyen <pclouds@xxxxxxxxx> wrote: > I think the two have quite different characteristics. alloc.c code is > driven by overhead. struct blob is only 24 bytes each and about 1/3 > the repo is blobs, and each malloc has 16 bytes overhead or so if I > remember correctly. struct cache_entry at minimum in 88 bytes so > relative overhead is not that a big deal (but sure reducing it is > still very nice). > > mem-pool is about allocation speed, I don't think so, given that we do a linear search in each block allocation. > but I think that's not a concern > for alloc.c because when we do full rev walk, I think I/O is always > the bottleneck (maybe object lookup as well). I don't see a good way > to have the one memory allocator that satisfyies both to be honest. By changing the allocation size of a block to be larger than 1024 entries in alloc. we should lessen the impact of management overhead, and then the mem pool can be more than feasible.