From: Amos Jeffries Date: Wed, 20 Oct 2010 05:40:28 +0000 (-0600) Subject: Author: Alex Rousskov X-Git-Tag: SQUID_3_1_9~35 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=253ed8bae2267f968567b383cbd00d9f44ba3204;p=thirdparty%2Fsquid.git Author: Alex Rousskov 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. --- diff --git a/src/HttpRequest.cc b/src/HttpRequest.cc index ca1637e0ae..58bbe95bc6 100644 --- a/src/HttpRequest.cc +++ b/src/HttpRequest.cc @@ -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 diff --git a/src/base/AsyncJob.cc b/src/base/AsyncJob.cc index 85b2a31350..a726d61ed8 100644 --- a/src/base/AsyncJob.cc +++ b/src/base/AsyncJob.cc @@ -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()