Annotation of embedaddon/php/Zend/README.ZEND_MM, revision 1.1.1.1

1.1       misho       1: Zend Memory Manager
                      2: ===================
                      3: 
                      4: General:
                      5: --------
                      6: 
                      7: The goal of the new memory manager (available since PHP 5.2) is to reduce memory
                      8: allocation overhead and speedup memory management.
                      9: 
                     10: The new manager's "configure" has no "--disable-zend-memory-manager" option,
                     11: but it has "--enable-malloc-mm" instead.  It is enabled by default in DEBUG
                     12: build and disabled by default in RELEASE build.  when enabled it allows selecting
                     13: between malloc and emalloc at runtime so you can use internal and external memory
                     14: debuggers without recompilation.
                     15: 
                     16: Debugging:
                     17: ----------
                     18: 
                     19: Normal:
                     20: 
                     21:     $ sapi/cli/php -r 'leak();'
                     22: 
                     23: Zend MM disabled:
                     24: 
                     25:     $ USE_ZEND_ALLOC=0 valgrind --leak-check=full sapi/cli/php -r 'leak();'
                     26: 
                     27: Tweaking:
                     28: ---------
                     29: 
                     30: The Zend MM can be tweaked using ZEND_MM_MEM_TYPE and ZEND_MM_SEG_SIZE environment
                     31: variables.  Default values are "malloc" and "256K". Dependent on target system you
                     32: can also use "mmap_anon", "mmap_zero" and "win32" storage managers.
                     33: 
                     34:        $ ZEND_MM_MEM_TYPE=mmap_anon ZEND_MM_SEG_SIZE=1M sapi/cli/php ..etc.

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>