]> git.ipfire.org Git - thirdparty/squid.git/commit - src/cbdata.cc
CBDATA: log memory leak situations when --enable-debug-cbdata
authorAmos Jeffries <squid3@treenet.co.nz>
Fri, 10 Oct 2014 16:06:38 +0000 (09:06 -0700)
committerAmos Jeffries <squid3@treenet.co.nz>
Fri, 10 Oct 2014 16:06:38 +0000 (09:06 -0700)
commitbc40792d89178332d4f02d0ac680171c859ac0ba
tree9c61a93d35b0ae3806bedceab079139635407bab
parent2327e7c0fddaec48923a094e96c3147a86ada9b2
CBDATA: log memory leak situations when --enable-debug-cbdata

CBDATA objects are supposed to be explicitly locked and unlocked by all
users. The nominal 'owner' of the data is also supposed to mark it as
invalid when unlocking its reference.

If a CBDATA object reaches 0 locks and is still valid, it therefore
follows that either the locking or invalidate has not been properly
implemented.

Now that we are migrating to CbcPointer usage instead of explicit
lock/unlock macro calls we have started encountering these situations.
Any object reporting a 'leak' must be investigated;
 a) perhapse RefCount is better?
 b) using CbcPointer consistently and invalidating correctly.
src/cbdata.cc