> From: Jeff Trawick [mailto:[EMAIL PROTECTED] > Sent: Wednesday, July 28, 2004 1:33 PM > To: [EMAIL PROTECTED]; [EMAIL PROTECTED] > 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
