cvs: ZendEngine2 / README.ZEND_MM
| From: | Andi Gutmans | Date: | Tue, 18 Jul 2006 16:54:37 +0000 |
| Subject: | cvs: ZendEngine2 / README.ZEND_MM | ||
| Groups: | php.zend-engine.cvs | ||
| Request: | Send a blank email to php-zend-engine-cvs+get-5084@lists.php.net to get a copy of this message | ||
andi Tue Jul 18 16:54:37 2006 UTC
Added files:
/ZendEngine2 README.ZEND_MM
Log:
- Capture Dmitry's Zend MM email for later reference
http://cvs.php.net/viewvc.cgi/ZendEngine2/README.ZEND_MM?view=markup&rev=1.1
Index: ZendEngine2/README.ZEND_MM
+++ ZendEngine2/README.ZEND_MM
The goal of the new memory manager (PHP 5.2 and later) is reducing memory allocation overhead and
speedup memory management.
The new manager's "configure" has no "--disable-zend-memory-manager"
option, but it has "--enable-malloc-mm" instead. It is enabled by default in DEBUG build
and disabled by default in RELEASE built. It allows select malloc/emalloc at runtime. So you can
use internal and external memory debuggers without recompilation.
$ sapi/cli/php -r 'leak();'
$ USE_ZEND_ALLOC=0 valgrind --leak-check=full -r 'leak();'
The patch allows tweaking memory manager with ZEND_MM_MEM_TYPE and ZEND_MM_SEG_SIZE environment
variables. Default values are "malloc" and "256K". Dependent on target system
you can also use "mmap_anon", "mmap_zero"
and "win32" storage managers.
$ ZEND_MM_MEM_TYPE=mmap_anon ZEND_MM_SEG_SIZE=1M sapi/cli/php