Skip to content
Find file History
Latest commit 790d551 Jun 8, 2011 3 @infusion Patch import
..
Failed to load latest commit information.
RFCs initial commit Jun 8, 2011
tests initial commit Jun 8, 2011
ChangeLog initial commit Jun 8, 2011
LICENSE initial commit Jun 8, 2011
Makefile.am initial commit Jun 8, 2011
Makefile.frag initial commit Jun 8, 2011
OBJECTS2_HOWTO initial commit Jun 8, 2011
README.ZEND_MM initial commit Jun 8, 2011
README.ZEND_VM initial commit Jun 8, 2011
ZEND_CHANGES initial commit Jun 8, 2011
Zend.dsp initial commit Jun 8, 2011
Zend.m4 initial commit Jun 8, 2011
ZendCore.dep initial commit Jun 8, 2011
ZendTS.dsp initial commit Jun 8, 2011
acconfig.h initial commit Jun 8, 2011
acinclude.m4 initial commit Jun 8, 2011
bench.php initial commit Jun 8, 2011
build.mk initial commit Jun 8, 2011
buildconf initial commit Jun 8, 2011
configure.in initial commit Jun 8, 2011
header initial commit Jun 8, 2011
zend.c Patch import Jun 8, 2011
zend.h initial commit Jun 8, 2011
zend.ico initial commit Jun 8, 2011
zend_API.c Patch import Jun 8, 2011
zend_API.h Patch import Jun 8, 2011
zend_alloc.c initial commit Jun 8, 2011
zend_alloc.h initial commit Jun 8, 2011
zend_build.h initial commit Jun 8, 2011
zend_builtin_functions.c Patch import Jun 8, 2011
zend_builtin_functions.h initial commit Jun 8, 2011
zend_closures.c initial commit Jun 8, 2011
zend_closures.h initial commit Jun 8, 2011
zend_compile.c Patch import Jun 8, 2011
zend_compile.h Patch import Jun 8, 2011
zend_config.nw.h initial commit Jun 8, 2011
zend_config.w32.h initial commit Jun 8, 2011
zend_constants.c Patch import Jun 8, 2011
zend_constants.h initial commit Jun 8, 2011
zend_default_classes.c initial commit Jun 8, 2011
zend_dynamic_array.c initial commit Jun 8, 2011
zend_dynamic_array.h initial commit Jun 8, 2011
zend_errors.h initial commit Jun 8, 2011
zend_exceptions.c initial commit Jun 8, 2011
zend_exceptions.h initial commit Jun 8, 2011
zend_execute.c Patch import Jun 8, 2011
zend_execute.h Patch import Jun 8, 2011
zend_execute_API.c initial commit Jun 8, 2011
zend_extensions.c initial commit Jun 8, 2011
zend_extensions.h initial commit Jun 8, 2011
zend_fast_cache.h initial commit Jun 8, 2011
zend_float.c initial commit Jun 8, 2011
zend_float.h initial commit Jun 8, 2011
zend_gc.c initial commit Jun 8, 2011
zend_gc.h initial commit Jun 8, 2011
zend_globals.h Patch import Jun 8, 2011
zend_globals_macros.h initial commit Jun 8, 2011
zend_hash.c initial commit Jun 8, 2011
zend_hash.h initial commit Jun 8, 2011
zend_highlight.c initial commit Jun 8, 2011
zend_highlight.h initial commit Jun 8, 2011
zend_indent.c initial commit Jun 8, 2011
zend_indent.h initial commit Jun 8, 2011
zend_ini.c initial commit Jun 8, 2011
zend_ini.h initial commit Jun 8, 2011
zend_ini_parser.c initial commit Jun 8, 2011
zend_ini_parser.h initial commit Jun 8, 2011
zend_ini_parser.output initial commit Jun 8, 2011
zend_ini_parser.y initial commit Jun 8, 2011
zend_ini_scanner.c initial commit Jun 8, 2011
zend_ini_scanner.h initial commit Jun 8, 2011
zend_ini_scanner.l initial commit Jun 8, 2011
zend_ini_scanner_defs.h initial commit Jun 8, 2011
zend_interfaces.c initial commit Jun 8, 2011
zend_interfaces.h initial commit Jun 8, 2011
zend_istdiostream.h initial commit Jun 8, 2011
zend_iterators.c Patch import Jun 8, 2011
zend_iterators.h Patch import Jun 8, 2011
zend_language_parser.c initial commit Jun 8, 2011
zend_language_parser.h Patch import Jun 8, 2011
zend_language_parser.output initial commit Jun 8, 2011
zend_language_parser.y Patch import Jun 8, 2011
zend_language_scanner.c initial commit Jun 8, 2011
zend_language_scanner.h initial commit Jun 8, 2011
zend_language_scanner.l Patch import Jun 8, 2011
zend_language_scanner_defs.h initial commit Jun 8, 2011
zend_list.c initial commit Jun 8, 2011
zend_list.h initial commit Jun 8, 2011
zend_llist.c initial commit Jun 8, 2011
zend_llist.h initial commit Jun 8, 2011
zend_modules.h initial commit Jun 8, 2011
zend_multibyte.c initial commit Jun 8, 2011
zend_multibyte.h initial commit Jun 8, 2011
zend_multiply.h initial commit Jun 8, 2011
zend_object_handlers.c initial commit Jun 8, 2011
zend_object_handlers.h initial commit Jun 8, 2011
zend_objects.c initial commit Jun 8, 2011
zend_objects.h initial commit Jun 8, 2011
zend_objects_API.c initial commit Jun 8, 2011
zend_objects_API.h initial commit Jun 8, 2011
zend_opcode.c initial commit Jun 8, 2011
zend_operators.c initial commit Jun 8, 2011
zend_operators.h initial commit Jun 8, 2011
zend_ptr_stack.c initial commit Jun 8, 2011
zend_ptr_stack.h initial commit Jun 8, 2011
zend_qsort.c initial commit Jun 8, 2011
zend_qsort.h initial commit Jun 8, 2011
zend_sprintf.c initial commit Jun 8, 2011
zend_stack.c initial commit Jun 8, 2011
zend_stack.h initial commit Jun 8, 2011
zend_static_allocator.c initial commit Jun 8, 2011
zend_static_allocator.h initial commit Jun 8, 2011
zend_stream.c initial commit Jun 8, 2011
zend_stream.h initial commit Jun 8, 2011
zend_strtod.c Patch import Jun 8, 2011
zend_strtod.h Patch import Jun 8, 2011
zend_ts_hash.c initial commit Jun 8, 2011
zend_ts_hash.h initial commit Jun 8, 2011
zend_types.h initial commit Jun 8, 2011
zend_variables.c initial commit Jun 8, 2011
zend_variables.h initial commit Jun 8, 2011
zend_vm.h initial commit Jun 8, 2011
zend_vm_def.h Patch import Jun 8, 2011
zend_vm_execute.h Patch import Jun 8, 2011
zend_vm_execute.skl initial commit Jun 8, 2011
zend_vm_gen.php initial commit Jun 8, 2011
zend_vm_opcodes.h Patch import Jun 8, 2011

README.ZEND_MM

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();'

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.
Something went wrong with that request. Please try again.