You are viewing a plain text version of this content. The canonical link for it is here.
Posted to modules-dev@httpd.apache.org by Sam Carleton <sc...@miltonstreet.com> on 2007/11/26 02:16:00 UTC
trick/tips for finding memory leaks
Thanks to the performance tools of my OS I have confirmed that
somewhere in my Apache module there is a memory leak. Are there any
tips or tricks out there for find memory leaks in an Apache module?
Sam
--
The contents of this e-mail are intended for the named addressee only.
It contains information that may be confidential. Unless you are the
named addressee or an authorized designee, you may not copy or use it,
or disclose it to anyone else. If you received it in error please
notify us immediately and then destroy it.
Re: trick/tips for finding memory leaks
Posted by "William A. Rowe, Jr." <wr...@rowe-clan.net>.
Sam Carleton wrote:
> On 11/26/07, ed <ed...@s5h.net> wrote:
>
>> Generally speaking, if you're using apr routines then they should
>> handle the memory resources for you, there should be little need for
>> allocating on the heap.
However - you do have to be very careful of your pool scope. A single
misplaced conn->pool reference means your request data is going to
survive every kept-alive request on that worker for that client; while
there are even uglier ways to mess yourself up using the process, child
or even cmd pools.
Bill
Re: trick/tips for finding memory leaks
Posted by Sam Carleton <sc...@miltonstreet.com>.
On 11/26/07, ed <ed...@s5h.net> wrote:
> Generally speaking, if you're using apr routines then they should
> handle the memory resources for you, there should be little need for
> allocating on the heap.
Re: trick/tips for finding memory leaks
Posted by ed <ed...@s5h.net>.
On Sun, 25 Nov 2007 20:16:00 -0500
"Sam Carleton" <sc...@miltonstreet.com> wrote:
> Thanks to the performance tools of my OS I have confirmed that
> somewhere in my Apache module there is a memory leak. Are there any
> tips or tricks out there for find memory leaks in an Apache module?
Run inside gdb as a single process, not forking any background
processes, -X i think. Then step through your code to see where the
leak is.
Generally speaking, if you're using apr routines then they should
handle the memory resources for you, there should be little need for
allocating on the heap.
--
The 28.8 frame relay to the Netapp is smelling funky because of All
your base are belong to us. Sun Microsystems is havin' a smoke.
:: http://www.s5h.net/ :: http://www.s5h.net/gpg.html