httpd-modules-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jaysingh Samuel <jayasingh.sam...@hotmail.com>
Subject RE: Memory leaks on adding module directives on virtual host.
Date Thu, 09 Jul 2009 03:41:58 GMT

Hi, 
Thanks for your reply.
We use the apr pool to store the config directive to the server config.
In the command table we get the serverConfig pointer and store the value like the following.
serverConf =        ap_get_module_config(parms->server->module_config, &xyz_module);
serverConf->abc = apr_pstrdup(parms->pool, arg);

Although i don't use any specific cleanup function for the server Config, i don't see any
memory Leak, but whenever i add the module specific directory in the virtual Host block, then
i see the memory Leak ie the memory size gets increased on every graceful restart of the server.

Please let me know how to fix this.
Thanks in advance, Jaysingh
> Subject: RE: Memory leaks on adding module directives on virtual host.
> Date: Wed, 8 Jul 2009 16:00:33 -0400
> From: Houser.Rick@aoins.com
> To: modules-dev@httpd.apache.org; jayasingh.samuel@hotmail.com
> CC: jzobel@heute-morgen.de
> 
> >> We do have Cleanup function which frees up all the malloc'ed memory 
> >> space.
> 
> Assuming you have a good reason to diverge from pool based memory
> allocation, have you added logging statements to confirm that you are in
> fact issuing one free per allocate, or was that an assumption?
> 
> 
> Thanks,
> 
> Rick Houser
> Auto-Owners Insurance
> Systems Support
> (517)703-2580
> 
> -----Original Message-----
> From: Joachim Zobel [mailto:jzobel@heute-morgen.de] 
> Sent: Wednesday, July 08, 2009 3:46 PM
> To: modules-dev@httpd.apache.org
> Cc: Jaysingh Samuel
> Subject: RE: Memory leaks on adding module directives on virtual host.
> 
> Am Mittwoch, den 08.07.2009, 12:50 +0530 schrieb Jaysingh Samuel:
> > We do have Cleanup function which frees up all the malloc'ed memory 
> > space.
> 
> Why don't you simply use the APR configuration pool?
> 
> Sincerely,
> Joachim
> 
> 
> 
> 

_________________________________________________________________
Live Search extreme As India feels the heat of poll season, get all the info you need on the
MSN News Aggregator
http://news.in.msn.com/National/indiaelections2009/aggregator/default.aspx
Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message