There was a comment by Olivier to one of my previous posts mentioning, that php was still leaking memory even on the simpliest example. That’s not exactly true. I added some more memory-information output to that example and made “hard” testing by ab. Here are some results:
Hello world! #22960 Memory usage: 232312 Peak Memory usage: 275352 Memory usage last growed at request#71
Looks good enogh for me
p.s. weekend is coming — I will be posting some more-interesting stuff

I think this is a great idea.. I’ve been thinking about this stuff for a while ..
It will force programmers to clean up their data though.. (which is IMHO not a bad thing anyway)
Once you have this setup.. do you think its viable to change some of the core stuff to C to make it run faster?
I’ve also been hoping for a while for a more stricter PHP mode.. Which would force pear-style classpaths.. I think if something like that is implemented opcode caches can operate a lot more efficient as well..
But I guess thats off-topic
Evert, the plan is:
1) SCGI-protocol in PHP
2) FastCGI-protocol in PHP
3) FastCGI-protocol in C
I tested your example (Revision 8), and it appears memory usage has “stages”:
#1 : 185.852
#2 to #98 : growing over and over
#99 : 246.148
Then: stable
Another growing at #250 approximately.
I did this test 5 times, and I always have this “double growing”.
And an additional test : just leave your app up & running, wait for a few minutes, and hit F5 : memory usage will be higher.
Olivier:
I actually think that this jumpy-slow “growing” has something to do with:
a) growth of page-output (slow)
b) the way php reuses memory (jumpy)