Hi all,
  this second attempt at bug4438 tries a different approach: by giving
MemBlob its own pools and having a hard initialization dependency in
MemBlob's allocating function, instead of relying on memAllocString.

Known side-effects:
- allows to tune memblob sizes according to actual use patterns, which
can be collected via SBuf/MemBlob detailed stats. The currently-set
sizes follow some light testing I've done.
- it causes a dependency on full libmem in unit tests, since stubbing
memAllocString and friends is no longer sufficient
- as no MemBlob can be initialized before MemPools, there is no need
to baloon statically-initialized MemBlobs to
SmallestStringBeforeMemIsInitialized.

One thing I can't figure out is in cachemgr mem report: it lists the
smallest-sized MemBlob pool twice. I've treble-checked: MemBlob pools
are only initialized once, yet in following the
MemPools::Instance::pools linked-list they appear more than once. I
can't really understand why.

Comments?

Thanks

-- 
    Francesco

Attachment: memblob-self-pools-v1.bundle
Description: Binary data

_______________________________________________
squid-dev mailing list
[email protected]
http://lists.squid-cache.org/listinfo/squid-dev

Reply via email to