Stas Bekman wrote: > Geoffrey Young wrote: > >>> Much better, but still why having any data at all in mod_perl.c? Have >>> the static variable in modperl_apache.c and provide an accessor to do: >>> >>> hook_order = apr_table_make(p, 0); >>> >>> from modperl_apache.c. Now you are all set. >> >> >> >> well, I can't see where to draw the pool from or how else to inialize it. >> that is, unless I just make the declaration >> >> static *hook_order = apr_table_make(modperl_global_get_pconf(), 0); > > > You could do that. But I was merely suggesting to have a function > defined in modperl_apache.c that you will call from mod_perl.c, instead > of accessing the raw variable.
yeah, ok. so I can keep the init in pre-config? I guess if I use the pconf it doesn't really matter - I can have the accessor init using pconf if the table is NULL. and I was doubting the lifetime of parms->pool anyway :) > > I'm also thinking that we have this and a few other things that are used > only at the server startup and are no longer needed at run time. So may > be we should really create a sub-pool and destroy it when we are done > with it? e.g. create it at the preconfig phase and destroy it at the > postconfig phase? So we will save a bit of a memory. yeah, that might be a good idea. > > But that of course can be done separately, after you roll this change in. ok, cool. I'll give the logic another once over and commit it tomorrow. I really, really appreciate the feedback and pointers. thanks. --Geoff --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
