diff options
author | Andi Gutmans <andi@php.net> | 2006-07-18 16:54:37 +0000 |
---|---|---|
committer | Andi Gutmans <andi@php.net> | 2006-07-18 16:54:37 +0000 |
commit | c32b733940698ba883b09a119d631ed5549c6ab0 (patch) | |
tree | f6f43e6b49b5ed2b6666d7967672c651b27c67a3 /Zend/README.ZEND_MM | |
parent | 4509fb33c53ec7f991a73b57819ae7eb34f0eb3a (diff) | |
download | php-git-c32b733940698ba883b09a119d631ed5549c6ab0.tar.gz |
- Capture Dmitry's Zend MM email for later reference
Diffstat (limited to 'Zend/README.ZEND_MM')
-rw-r--r-- | Zend/README.ZEND_MM | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/Zend/README.ZEND_MM b/Zend/README.ZEND_MM new file mode 100644 index 0000000000..0825e08b40 --- /dev/null +++ b/Zend/README.ZEND_MM @@ -0,0 +1,13 @@ +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 + |