httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
Subject Memory Pool Management Question
Date Wed, 08 May 1996 15:22:57 GMT
I have a module which in some instances can eat up a lot of memory.
I use the palloc() and pstrdup() routines from the Apache API to fetch
this memory from the session memory pool.  I don't free this memory
when I am done with it, instead relying on Apache to do something
intelligent with it when I am done.

In skimming the alloc.c code, it doesn't look to me that this memory is
ever returned to the system.  It is marked as having been freed and is
thus available to ensuing sessions.  My module is a script language
parser which for certain scripts can eat up many megabytes.  I have one
script which easily takes 60 megabytes to chew away on mSQL database
queries.  This 60 meg script doesn't get run very often.  Perhaps once
every 500 queries. However, eventually all my httpd processes will have
run this large script once and the result is that they have all allocated
60 megabytes.  

Suggestions?  Should I not be using the session pool memory for this?
Or, could there be some way through the API to force this memory to
be returned to the system?  Or, am I completely off-base in my understanding
of how this works?


View raw message