httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Dean Gaudet <dgau...@arctic.org>
Subject Re: memory leak when adding a new module, please help!
Date Sat, 10 Jan 1998 07:13:34 GMT
It sounds like the leak is probably caused by your module.  You do have to
make sure that all memory you allocate is in the appropriate pool (r->pool
is almost always the right pool).  Additionally if you're doing anything
that allocates other resources (such as mmap()) you have to register
cleanups for them yourself... a lot of things already have generic
cleanups you can use (fds, FILE *s, DIR *s, regexes, mmap).

Dean

On Mon, 5 Jan 1998, Igor Tatarinov wrote:

> Hi!
> 
> I got a very weird problem when trying to add my caching module to Apache.
> For some reason, Apache doesn't want to release memory anymore.
> 
> Here is what I have:
> 
> - I didn't change anything in Apache itself
> - I didn't overload any methods but init/config and the handler 
> - I never allocate anything after init
> 
> - when my module always DECLINEs requests, everything works fine (Apache
> frees memory)
> 
> - when I run my module separately (I have a small http server for that), my
> small server doesn't eat memory
> 
> - when I enable my module in Apache, the httpd processes start growing
> as if they never clean any pools (like if I had a single unlimited
> keepalive connection).
> 
> I feel like I am lost and have no idea what could cause this problem.
> 
> I don't have to call any cleanup functions from my module, do I?
> 
> I would appreciate any suggestions, please help!
> igor
> 


Mime
View raw message