[squid-dev] [PATCH] convert Delay Pools classes to use MEMPROXY_CLASS

Amos Jeffries squid3 at treenet.co.nz
Sun Jan 22 21:23:28 UTC 2017


On 22/01/2017 4:51 p.m., Alex Rousskov wrote:
> On 01/21/2017 06:42 PM, Amos Jeffries wrote:
> 
>> This patch converts all the delay pools classes which were providing the
>> new/delete operators to using MEMPROXY_CLASS instead. So each class in
>> separately accounted for and we get a better view of allocation stats
>> and behaviours from the mgr:mem report.
> 
> 
> You went beyond those desirable changes. For example:

Okay. Splitting the changes into two. If we can agree on the below item
I will apply just the MEMPROXY change then do the findalive things as a
separate submission.

> 
>> -long DelayPools::MemoryUsed = 0;
> 
> The total provided by this global was probably quite handy/useful. If we
> can compute and still print it in DelayPools::Stats(), please do so,
> probably with a "Delay pools memory used: " prefix.
> 

With MEMPROXY we dont have access to mem_type to simply sum up the
memory usage, each pool is also defined within private class scope, and
the global reporter functionality is hard-coded to be a grid layout.

I could try to multiple the Foo::UseCount() counters by class sizes, but
that is a lot of trouble and risks future edits forgetting to update the
list. I dont think its worthwhile just for this value, but if you insist
I can try to add that.

Amos



More information about the squid-dev mailing list