summaryrefslogtreecommitdiff
path: root/Zend/README.ZEND_MM
diff options
context:
space:
mode:
authorJani Taskinen <jani@php.net>2007-07-19 13:57:06 +0000
committerJani Taskinen <jani@php.net>2007-07-19 13:57:06 +0000
commit5778b43e2f7292c39a78f9e6cfc38f9b30ef4a59 (patch)
treef7ec7cbbf897d87316dcb377d3d5d7c4811364b9 /Zend/README.ZEND_MM
parent0dcd530e229b1654e4e7ec7c60bdb268588b02a7 (diff)
downloadphp-git-5778b43e2f7292c39a78f9e6cfc38f9b30ef4a59.tar.gz
Beautify and reword a bit.
Diffstat (limited to 'Zend/README.ZEND_MM')
-rw-r--r--Zend/README.ZEND_MM35
1 files changed, 28 insertions, 7 deletions
diff --git a/Zend/README.ZEND_MM b/Zend/README.ZEND_MM
index 0825e08b40..cf9a9b7e83 100644
--- a/Zend/README.ZEND_MM
+++ b/Zend/README.ZEND_MM
@@ -1,13 +1,34 @@
-The goal of the new memory manager (PHP 5.2 and later) is reducing memory allocation overhead and speedup memory management.
+Zend Memory Manager
+===================
-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.
+General:
+--------
-$ sapi/cli/php -r 'leak();'
+The goal of the new memory manager (available since PHP 5.2) is to reduce memory
+allocation overhead and speedup memory management.
-$ USE_ZEND_ALLOC=0 valgrind --leak-check=full -r 'leak();'
+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 build. when enabled it allows selecting
+between malloc and emalloc at runtime so you can use internal and external memory
+debuggers without recompilation.
-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.
+Debugging:
+----------
-$ ZEND_MM_MEM_TYPE=mmap_anon ZEND_MM_SEG_SIZE=1M sapi/cli/php
+Normal:
+ $ sapi/cli/php -r 'leak();'
+
+Zend MM disabled:
+
+ $ USE_ZEND_ALLOC=0 valgrind --leak-check=full sapi/cli/php -r 'leak();'
+
+Tweaking:
+---------
+
+The Zend MM can be tweaked using 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 ..etc.