|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
[2000-07-14 03:21 UTC] mookid at sigent dot ru
When I run Apache under root with dynamically linked PHP 4.0.1pl2, 'ps' reports huge VSZ values for httpd, about 70M. 'top' says the size is normal though. May this be a normal behaviour, related to MM, or what? When I ran it under a nonprivileged user, the size was okay. Another thing is that httpd processes grow at each restart, grabbing dozens of kilobytes in RSS and another 30 crazy megs in VSZ. I built PHP against Apache 1.3.12 with the Russian patch, EAPI and SSI patches applied. Here's my configuration line: ./configure --with-apxs=/usr/sbin/apxs --without-mysql --without-gd --disable-static --disable-debug --enable-pic --enable-inline-optimization --enable-versioning --prefix=/usr --with-config-file-path=/etc/httpd/conf --enable-magic-quotes --enable-debugger --enable-track-vars --enable-safe-mode --enable-discard-path --enable-force-cgi-redirect --enable-memory-limit --enable-trans-sid --with-exec-dir=/usr/bin --with-mod_charset --with-mm --with-regex=system --with-gdbm --enable-xml --enable-wddx --enable-sysvsem --enable-sysvshm PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Tue Oct 28 06:00:01 2025 UTC |
Yupee! I've spent some time at the debugger, and here it is: the leak is in the configuration-scanner. There plainly was no buffer deallocation in the scanner code, and the Apache module re-reading php.ini get a leak by allocating the buffer again. Here's the patch, that simple: --- main/configuration-scanner.l Mon Jun 26 22:15:49 2000 +++ main/configuration-scanner.l.new Wed Oct 18 17:57:28 2000 @@ -180,3 +180,8 @@ php_error(E_NOTICE,"Unexpected character on line %d: '%s' (ASCII %d)\n",yylineno,yytext,yytext[0]); #endif } + +<<EOF>> { + yy_delete_buffer(YY_CURRENT_BUFFER); + yyterminate(); +}