Date: 01/11/01
- Next message: Uwe Steinmann: "Re: [PHP-DEV] Call to ldap_connect() returns always false"
- Previous message: Jim Jagielski: "Re: [PHP-DEV] Sent location header with port!"
- In reply to: Stanislav Malyshev: "Re: [PHP-DEV] PHP4: php_module holds memory to long !"
- Next in thread: Filip Sielimowicz: "Re: [PHP-DEV] PHP4: php_module holds memory too long !"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
> The reason is that httpd memory usage patterns significantly differ from
> your simple example. E.g., there might be some memory block allocated at
> the end of the heap, which is not freed at the end of the request - and it
> will prevent all the rest of memory from being returned to the system.
Don't blame "httpd memory usage patterns" ! Of course they differ from
my simple example, but...
I've changed "a bit" files Zend/zend_alloc.c and ...h files.
I've just replaced the definitions of _emalloc, _efree... functions
with simple #defines, linking them back to standard malloc, free... and
so on functions.
The compilation - went OK (I suppose, debug can not be set).
The apache restart - OK.
Testing php - .... - OK !
And the memory holding problem disapeared ! Memory is beeing returned
to system as the script finishes.
So...
It is not a good solution, of course, because Zend memory optimaliser is
turned off. But now we know, where should be put some afford to fix
the problem. The optimaliser propably leaves only some memory blocks
unfreed, but they make it unposible to return rest of memory back to
system.
Am I not right ? May be not...
I send the changed files, but I suggest not to use them...
For example replacement of function _persist_alloc with value 1
is very ... hmm... controversial ? It should return the size of
block (as I suppose), but it was difficult to do that by simple means.
- TEXT/PLAIN attachment: c file
- TEXT/PLAIN attachment: header file
-- PHP Development Mailing List <http://www.php.net/> To unsubscribe, e-mail: php-dev-unsubscribe <email protected> For additional commands, e-mail: php-dev-help <email protected> To contact the list administrators, e-mail: php-list-admin <email protected>
- Next message: Uwe Steinmann: "Re: [PHP-DEV] Call to ldap_connect() returns always false"
- Previous message: Jim Jagielski: "Re: [PHP-DEV] Sent location header with port!"
- In reply to: Stanislav Malyshev: "Re: [PHP-DEV] PHP4: php_module holds memory to long !"
- Next in thread: Filip Sielimowicz: "Re: [PHP-DEV] PHP4: php_module holds memory too long !"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]

