httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Sander Striker" <stri...@apache.org>
Subject RE: [PROOF-OF-CONCEPT?] logging memory used by an allocator
Date Sun, 01 Aug 2004 17:46:14 GMT
> From: Jeff Trawick [mailto:trawick@attglobal.net] 
> Sent: Wednesday, July 28, 2004 1:33 PM
> To: dev@apr.apache.org; dev@httpd.apache.org
> Subject: [PROOF-OF-CONCEPT?] logging memory used by an allocator
> 
> A couple of questions come up from an application perspective:
> 
> am I leaking memory?  if so, on what operation?
> how much memory does it take to perform a certain operation?
> 
> If the application can find out how much heap memory is 
> presently owned by a certain allocator, it can be easier to 
> address such questions.

Wouldn't you want to know the memory currently being held by 
the allocator as well as all the memory the allocator dished
out to it's pools?
 
> The attached apr.patch adds apr_allocator_memsize_get() to 
> find the amount of heap memory presently owned by the 
> allocator.  (debug pool flavor not implemented; what is 
> implemented isn't tested much ;) )

Given that memory management is on the critical path we need
to be careful what we add.  But this patch seems pretty harmless
in that respect.

> The attached httpd.patch adds %Z log format to mod_log_config 
> to log the memory size of the allocator used by the request 
> pool.  (I would lean towards implementing this feature in a 
> debug module instead of in mod_log_config.)

I assume you implemented this because of an itch? :)

Sander


Mime
View raw message