On Wed, 19 Mar 2008 17:08:53 -0500 "William A. Rowe, Jr." <[EMAIL PROTECTED]> wrote:
> > I am *not* worried about some sort of memory leak with the pool used > > by register_hooks. It is the contrary: I am not sure if the > > register_hooks pools gets destroyed / cleared too *early* or in > > between so that we are pointing > > to invalid memory. So please some eyes on this aspect. > > What happens is that a module must register itself during config, and > remove itself from the hash during post-config. Hopefully during the > re-config phase it replaces it's own hash registration. > > If this doesn't happen and the module is removed from the list during > a graceful restart, there will still be a hash entry into it. > > It's possible to do a pconf teardown resetting the hash, but if we > reset while modules are unregistering themselves, we are back to the > original fault. Right, we need to exercise care with pool lifetime. Let me resurrect my previous suggestion: a subpool which we tear down in post_config. We can also set the pool and the hash to NULL, to make debugging easy if we or a module developer screw up. That of course also says modules should NOT deregister themselves! -- Nick Kew Application Development with Apache - the Apache Modules Book http://www.apachetutor.org/
