Hi aAndy
> We didn't find a material difference between malloc() and mmap() though,
> most probably because malloc() at these sizes actually calls mmap().
You can have good difference with the mremap() of Linux because it directly
changes the vector into memory without recopying these data.
--
Before beginning a benchmark I would like to speak about a serious problem
that I have with TSRM/MM.
A S1 script carried out by thread T1 will use the same memory capacity as S2
script by T2 whereas theoretically separation is obligatory. In addition to
the problem of safety, that cause also a problem of management of the load
memory of the process father.
We define a father process P=while(1);
When a process father starts it must initialize tsrm_startup(),
sapi_startup() and php_module_startup(). At this time all the additional
functions and objects are loaded and usable by all script (what is normal).
With the creation of a thread one associates a TSRMLS to it. Then one
carries out php_request_startup(), php_execute_script() and
php_request_shutdown() to entirely enclose PHP/Zend.
With the execution of Sx script in Tx: the variables dynamics, static and
constant of this one will be stored in AG(head).
The problem comes from there. It is impossible to destroy a memory which a
script has just used because the process father continues to turn and nor
php_request_shutdown(), php_module_shutdown(), sapi_shutdown() and
tsrm_shutdown() will not be carried out AND THUS there will be a mem leak
I am very annoyed by this problem, it is necessary that I find a possibility
to destroy these buffer.
Michael Vergoz
----- Original Message -----
From: "Andi Gutmans" <andi@zend.com>
To: "'Michael Vergoz'" <mv-php@binarysec.com>; <internals@lists.php.net>
Sent: Tuesday, July 11, 2006 8:26 AM
Subject: RE: [PHP-DEV] FW: Help needed in benchmarking memory patch