Re: cvs: php4 /sapi/fastcgi fastcgi.c
| From: | Ben Mansell | Date: | Thu, 03 May 2001 12:15:06 +0000 |
| Subject: | Re: cvs: php4 /sapi/fastcgi fastcgi.c | ||
| References: | 1 | Groups: | php.cvs |
| Request: | Send a blank email to php-cvs+get-5503@lists.php.net to get a copy of this message | ||
On Wed, 2 May 2001, Andi Gutmans wrote:
> Won't it leak memory for each request? Will messing directly with environ
> work on all platforms?
Yes, it leaks on every request, we waste 'sizeof(char *)' for each
variable per request. Unfortunately it seems unavoidable, on some
platforms if I try to clean up our environ after running the script, it
crashes. I still haven't figured out why yet. The fastcgi runner however
will kill off its children every 'n' requests and start some more, so
the memory leak will now grow too large.
As for whether this works on all platforms, I can safely say it works on
all the following:
Linux/glibc-2.0/Intel
Linux/glibc-2.1/Intel
Linux/alpha
Linux/ppc
Linux/ia64
OpenBSD 2.8
Unixware 7
AIX 4.3
FreeBSD 3.4
FreeBSD 4.2
HPUX 10
HPUX 11
HPUX 11.20/ia64
Solaris 2.6/Intel
Solaris 2.6/sparc
IRIX 6.4
Tru64 4.0
So I'm pretty confident its OK :-)
--
Ben Mansell, <ben@zeus.com> Zeus Technology Ltd
Download the world's fastest webserver! Universally Serving the Net
T:+44(0)1223 525000 F:+44(0)1223 525100 http://www.zeus.com
Zeus House, Cowley Road, Cambridge, CB4 0ZT, ENGLAND