Skip to content

Files

Zend

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
Oct 18, 2013
Oct 18, 2016
Jan 5, 2006
Dec 22, 2013
Jan 25, 2005
Apr 12, 2004
Mar 6, 2012
Jul 15, 2013
Jul 15, 2013
Jan 28, 2014
Feb 16, 2012
Feb 26, 2001
Dec 22, 2013
Sep 17, 2013
May 24, 2010
May 16, 2011
Oct 4, 1999
May 16, 2011
Jan 11, 2010
Oct 18, 2011
Jan 2, 2016
Jan 2, 2016
Apr 7, 1999
Sep 26, 2016
Oct 11, 2016
Sep 24, 2016
Sep 13, 2016
Jan 2, 2016
Jan 2, 2016
Jan 2, 2016
Jan 2, 2016
Jan 2, 2016
Jan 2, 2016
Jan 2, 2016
Sep 28, 2016
Sep 28, 2016
Jan 2, 2016
Jan 2, 2016
Jan 2, 2016
Jan 2, 2016
Jan 2, 2016
Aug 22, 2013
Apr 24, 2010
Dec 4, 2012
Jan 2, 2016
Jan 2, 2016
Jan 2, 2016
Oct 11, 2016
Jan 2, 2016
Aug 21, 2016
Jan 2, 2016
Oct 18, 2016
Jan 2, 2016
Jan 2, 2016
Jan 2, 2016
Jan 2, 2016
Jul 16, 2016
Jan 2, 2016
Jan 2, 2016
Jan 2, 2016
Jan 2, 2016
Jan 2, 2016
Jan 2, 2016
Jan 2, 2016
Jan 2, 2016
Jan 2, 2016
Jan 2, 2016
Jan 2, 2016
Jan 2, 2016
Jan 2, 2016
Jan 2, 2016
Jan 2, 2016
Jan 2, 2016
Jan 2, 2016
Oct 20, 2015
Jan 2, 2016
Jan 2, 2016
Jan 2, 2016
Jan 2, 2016
Jan 2, 2016
Jan 2, 2016
Jan 2, 2016
Jan 2, 2016
Jan 2, 2016
Mar 10, 2014
Jan 2, 2016
Jan 2, 2016
Jan 2, 2016
Jan 2, 2016
Jan 2, 2016
Jan 2, 2016
Jan 2, 2016
Jan 2, 2016
Jan 2, 2016
Jan 2, 2016
Jan 2, 2016
Jan 2, 2016
Sep 13, 2016
Jan 2, 2016
Jan 2, 2016
May 24, 2016
Jan 2, 2016
Jan 2, 2016
Jan 2, 2016
Jan 2, 2016
Jan 2, 2016
Mar 5, 2015
Jan 4, 2012
Jan 2, 2016
Jan 2, 2016
Jan 2, 2016
Jan 2, 2016
Jan 2, 2016
Jan 2, 2016
Jan 2, 2016
Jan 2, 2016
Jan 2, 2016
May 7, 2016
Jan 2, 2016
Jan 2, 2016
Jan 2, 2016
Jan 2, 2016
Jan 2, 2016
Jan 2, 2016
Sep 6, 2016
Jan 1, 2016
Jan 2, 2016
Sep 28, 2016
Sep 28, 2016
Dec 5, 2012
Jan 2, 2016
Jan 2, 2016
Jan 2, 2016
Zend Memory Manager
===================

General:
--------

The goal of the new memory manager (available since PHP 5.2) is to reduce 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 build. When enabled it allows selecting
between malloc and emalloc at runtime so you can use internal and external memory
debuggers without recompilation.

Debugging:
----------

Normal:

    $ sapi/cli/php -r 'leak();'

Zend MM disabled:

    $ USE_ZEND_ALLOC=0 valgrind --leak-check=full sapi/cli/php -r 'leak();'

Shared extensions:
------------------

Since PHP 5.3.11 it is possible to prevent shared extensions from unloading so
that valgrind can correctly track the memory leaks in shared extensions. For
this there is the ZEND_DONT_UNLOAD_MODULES environment variable. If set, then
DL_UNLOAD() is skipped during the shutdown of shared extensions.


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.