Re: [Templates] Template Process Issue? Leak?
[prev]
[thread]
[next]
[Date index for 2005/02/22]
On Tue, 22 Feb 2005 11:43:30 -0500, asantucci@xxx.xxx <asantucci@xxx.xxx> wrote:
> I've got a memory leak and I've noticed one thing.
> The memory usage of the scripts seems to increase ( greatly )
> with the call to $template->process. I've done the metrics with
> the GLibTop module and there is a 1.2 MB jump in the memory
> size of my process when I call the process method. This memory
> never gets released. Comment out the process call and no jump in
> memory...no page either but I guess you can't have everything.
Does it jump by 1.2 Megs everytime you reload the page, or does it
only jump the very first time, and then possibly goes up only slightly
on subsequent requests?
> Even if I call $template->process( emptyfile, {} ) the process memory
> still jumps up and won't release.
>
> Is there some way to force it to release or clean itself up?
> Or am I doing something wrong here.
Processes never return memory that they have been allocated to the OS.
They reuse the same memory internally, but you will never see a
process decrease in size. The memory only gets released when the
process exits. Since you are using mod_perl, the memory only gets
reclaimed when the apache child process exits.
But perl will manage the memory internally, so if you undef a
variable, that memory can be re-used by perl for another variable.
But the process will not decrease in size.
--
Cees Hek
_______________________________________________
templates mailing list
templates@xxxxxxxxxxxxxxxx.xxx
http://lists.template-toolkit.org/mailman/listinfo/templates
 |
 |
Re: [Templates] Template Process Issue? Leak?
Cees Hek 17:18 on 22 Feb 2005
|