]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
Author: Alex Rousskov <rousskov@measurement-factory.com>
authorAmos Jeffries <amosjeffries@squid-cache.org>
Wed, 20 Oct 2010 05:40:28 +0000 (23:40 -0600)
committerAmos Jeffries <amosjeffries@squid-cache.org>
Wed, 20 Oct 2010 05:40:28 +0000 (23:40 -0600)
Added debugging to track HttpRequest and AsyncJob memory leaks.

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 ca1637e0aee17e2171adbf9578155870106e099c..58bbe95bc6a9dc764511f68e5a99491837f52bf1 100644 (file)
@@ -51,6 +51,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);
 }
@@ -58,6 +60,7 @@ HttpRequest::HttpRequest(const HttpRequestMethod& aMethod, protocol_t aProtocol,
 HttpRequest::~HttpRequest()
 {
     clean();
+    debugs(93,7, HERE << "destructed, this=" << this);
 }
 
 void
index 85b2a313502ca90e56db1327ac5e804a70f6ffba..a726d61ed8ca2085244fc93373dc1516b4bae83f 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()