]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
Added debugging to track HttpRequest and AsyncJob memory leaks.
authorAlex Rousskov <rousskov@measurement-factory.com>
Sun, 12 Sep 2010 00:10:47 +0000 (18:10 -0600)
committerAlex Rousskov <rousskov@measurement-factory.com>
Sun, 12 Sep 2010 00:10:47 +0000 (18:10 -0600)
This change is related to Squid bug #2964.
Based on lp 3p1-rock branch, r9611 and r9612.

src/HttpRequest.cc
src/base/AsyncJob.cc

index 762900b1ca9cb36c01a2a0962c00b7a84af380c2..b383791a6d68f955a902d565e260df9c548ec95c 100644 (file)
@@ -52,6 +52,8 @@ HttpRequest::HttpRequest() : HttpMsg(hoRequest)
 
 HttpRequest::HttpRequest(const HttpRequestMethod& aMethod, protocol_t aProtocol, const char *aUrlpath) : HttpMsg(hoRequest)
 {
+    static unsigned int id = 1;
+    debugs(93,7, HERE << "constructed, this=" << this << " id=" << ++id);
     init();
     initHTTP(aMethod, aProtocol, aUrlpath);
 }
@@ -59,6 +61,7 @@ HttpRequest::HttpRequest(const HttpRequestMethod& aMethod, protocol_t aProtocol,
 HttpRequest::~HttpRequest()
 {
     clean();
+    debugs(93,7, HERE << "destructed, this=" << this);
 }
 
 void
index 3fd55571381b7bcb88ef8c93a5f2b83825258785..215fd842fc1dfad4691fde2c9daf42c18483f169 100644 (file)
@@ -22,12 +22,14 @@ AsyncJob::Pointer AsyncJob::Start(AsyncJob *j)
 
 AsyncJob::AsyncJob(const char *aTypeName): typeName(aTypeName), inCall(NULL), id(++TheLastId)
 {
-    debugs(93,3, "AsyncJob of type " << typeName << " constructed, this=" << this <<
-           " [async" << id << ']');
+    debugs(93,5, "AsyncJob constructed, this=" << this <<
+           " type=" << typeName << " [job" << id << ']');
 }
 
 AsyncJob::~AsyncJob()
 {
+    debugs(93,5, "AsyncJob destructed, this=" << this <<
+           " type=" << typeName << " [job" << id << ']');
 }
 
 void AsyncJob::start()