SV>> How does Zend allocate memory then? I guess I could try to
SV>> figure it out myself, but it's a bit complex. Are there many
SV>> small chunks? Seems like emalloc() is called a lot creating
SV>> small chunks, but each emalloc() doesn't result in a
SV>> corresponding malloc() perhaps? I guess with glibc on Linux it
emalloc caches small memory blocks (certain amount of them), which are
pre-allocated at the init time. I.e., actual malloc() doesn't get called
every time emalloc() is called. But this cache is mostly useful for Zend's
own memory allocations, it won't help if you allocate a lot of space in
your scripts.
SV>> would be nice if malloc() allocated say 128k chunks, and
SV>> emalloc() used memory inside those.
That would require us to implement own memory management, which is not too
simple.
--
Stanislav Malyshev, Zend Products Engineer
[EMAIL PROTECTED] http://www.zend.com/ +972-3-6139665 ext.115
--
PHP Development Mailing List <http://www.php.net/>
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]