|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
[2006-01-29 09:08 UTC] momo@php.net
Description:
------------
while playing with big arrays, i see that memory that was used on php with apache 1.3 sapi doesn't became free till the next time apache use *the same* process. here how the memory looks like *after* the scripts have finish to run:
momo@(none) htdocs # ps -A v|grep http
27677 ? Ss 0:00 0 4188 8875 4532 0.8 /www5/bin/httpd
27679 ? S 0:00 0 4188 8875 3072 0.5 /www5/bin/httpd
27680 ? S 0:03 1 4188 31759 26580 5.1 /www5/bin/httpd
27681 ? S 0:00 0 4188 54019 48740 9.4 /www5/bin/httpd
27682 ? S 0:00 0 4188 8875 2532 0.4 /www5/bin/httpd
27683 ? S 0:00 0 4188 8875 2536 0.4 /www5/bin/httpd
27716 ? S 0:00 0 4188 8875 2536 0.4 /www5/bin/httpd
27764 pts/0 R+ 0:00 0 57 1406 436 0.0 grep http
Reproduce code:
---------------
for($a=0;$a<1024*512;$a++) {
$ret[] = 1.1;
}
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
|
|||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Fri Dec 05 07:00:01 2025 UTC |
My apology of being nagger but the bellow code, use memory (even without inner free) that become free right after the script execution ending. is there a problem to get back the php varibles memory, just like the efree do? PHP_FUNCTION(momo_test) { char *some_memory; int a; some_memory = (char *) emalloc(0x4000000); for(a=0;a<0x4000000;a++) some_memory[a]=0; //efree(some_memory); } Can you send me more exact reference how the linux memory allocation responsible for this spend memory?