Re: (non)growing memory while creating anoymous functions via eval()

From: Date: Mon, 04 Feb 2013 01:18:22 +0000
Subject: Re: (non)growing memory while creating anoymous functions via eval()
References: 1 2  Groups: php.internals 
Request: Send a blank email to internals+get-65602@lists.php.net to get a copy of this message
Hi Terry and all
thank you very much for your response.

The only thing that confused me about what you say that the second *doesn't* grow Yes, about that i was [and am still :-)] also confused... why the 2nd one won't grow *non-stop*
so I checked and it does -- just the same as the first. Right, it grows, but not non-stop as in the 1st one.
The memory will stop growing (on my machine) at ~2491584 bytes and the loop is able to run forever, creating each eval() furthermore uniqe ano-function's but not endless-filling Zend-internal tables.
but this still leaves the function record itself in the function_table hash so with a non-zero reference count and this doesn't get DTORed until request shutdown Not familar with the Zend-internals but just about so i was imaging and expecting it.
That why i [still] also confused/wondering why in the 2nd example the memory will not grow *endless*. It seems that the function records in the function_table will be DTORed (or similar cleaned up) before request-shutdown at some point... Could this be the case?

Thread (15 messages)

« previous php.internals (#65602) next »