FolusWen c2d3f4474f [Improve][GPL][PHP / lighttpd] 3 years ago
..
tests c2d3f4474f [Improve][GPL][PHP / lighttpd] 3 years ago
LICENSE c2d3f4474f [Improve][GPL][PHP / lighttpd] 3 years ago
Makefile.am c2d3f4474f [Improve][GPL][PHP / lighttpd] 3 years ago
Makefile.frag c2d3f4474f [Improve][GPL][PHP / lighttpd] 3 years ago
README.ZEND_MM c2d3f4474f [Improve][GPL][PHP / lighttpd] 3 years ago
README.ZEND_VM c2d3f4474f [Improve][GPL][PHP / lighttpd] 3 years ago
Zend.m4 c2d3f4474f [Improve][GPL][PHP / lighttpd] 3 years ago
acinclude.m4 c2d3f4474f [Improve][GPL][PHP / lighttpd] 3 years ago
bench.php c2d3f4474f [Improve][GPL][PHP / lighttpd] 3 years ago
buildconf c2d3f4474f [Improve][GPL][PHP / lighttpd] 3 years ago
configure.ac c2d3f4474f [Improve][GPL][PHP / lighttpd] 3 years ago
header c2d3f4474f [Improve][GPL][PHP / lighttpd] 3 years ago
micro_bench.php c2d3f4474f [Improve][GPL][PHP / lighttpd] 3 years ago
zend.c c2d3f4474f [Improve][GPL][PHP / lighttpd] 3 years ago
zend.h c2d3f4474f [Improve][GPL][PHP / lighttpd] 3 years ago
zend.ico c2d3f4474f [Improve][GPL][PHP / lighttpd] 3 years ago
zend_API.c c2d3f4474f [Improve][GPL][PHP / lighttpd] 3 years ago
zend_API.h c2d3f4474f [Improve][GPL][PHP / lighttpd] 3 years ago
zend_alloc.c c2d3f4474f [Improve][GPL][PHP / lighttpd] 3 years ago
zend_alloc.h c2d3f4474f [Improve][GPL][PHP / lighttpd] 3 years ago
zend_alloc_sizes.h c2d3f4474f [Improve][GPL][PHP / lighttpd] 3 years ago
zend_arena.h c2d3f4474f [Improve][GPL][PHP / lighttpd] 3 years ago
zend_ast.c c2d3f4474f [Improve][GPL][PHP / lighttpd] 3 years ago
zend_ast.h c2d3f4474f [Improve][GPL][PHP / lighttpd] 3 years ago
zend_bitset.h c2d3f4474f [Improve][GPL][PHP / lighttpd] 3 years ago
zend_build.h c2d3f4474f [Improve][GPL][PHP / lighttpd] 3 years ago
zend_builtin_functions.c c2d3f4474f [Improve][GPL][PHP / lighttpd] 3 years ago
zend_builtin_functions.h c2d3f4474f [Improve][GPL][PHP / lighttpd] 3 years ago
zend_closures.c c2d3f4474f [Improve][GPL][PHP / lighttpd] 3 years ago
zend_closures.h c2d3f4474f [Improve][GPL][PHP / lighttpd] 3 years ago
zend_compile.c c2d3f4474f [Improve][GPL][PHP / lighttpd] 3 years ago
zend_compile.h c2d3f4474f [Improve][GPL][PHP / lighttpd] 3 years ago
zend_config.nw.h c2d3f4474f [Improve][GPL][PHP / lighttpd] 3 years ago
zend_config.w32.h c2d3f4474f [Improve][GPL][PHP / lighttpd] 3 years ago
zend_constants.c c2d3f4474f [Improve][GPL][PHP / lighttpd] 3 years ago
zend_constants.h c2d3f4474f [Improve][GPL][PHP / lighttpd] 3 years ago
zend_cpuinfo.c c2d3f4474f [Improve][GPL][PHP / lighttpd] 3 years ago
zend_cpuinfo.h c2d3f4474f [Improve][GPL][PHP / lighttpd] 3 years ago
zend_default_classes.c c2d3f4474f [Improve][GPL][PHP / lighttpd] 3 years ago
zend_dtrace.c c2d3f4474f [Improve][GPL][PHP / lighttpd] 3 years ago
zend_dtrace.d c2d3f4474f [Improve][GPL][PHP / lighttpd] 3 years ago
zend_dtrace.h c2d3f4474f [Improve][GPL][PHP / lighttpd] 3 years ago
zend_errors.h c2d3f4474f [Improve][GPL][PHP / lighttpd] 3 years ago
zend_exceptions.c c2d3f4474f [Improve][GPL][PHP / lighttpd] 3 years ago
zend_exceptions.h c2d3f4474f [Improve][GPL][PHP / lighttpd] 3 years ago
zend_execute.c c2d3f4474f [Improve][GPL][PHP / lighttpd] 3 years ago
zend_execute.h c2d3f4474f [Improve][GPL][PHP / lighttpd] 3 years ago
zend_execute_API.c c2d3f4474f [Improve][GPL][PHP / lighttpd] 3 years ago
zend_extensions.c c2d3f4474f [Improve][GPL][PHP / lighttpd] 3 years ago
zend_extensions.h c2d3f4474f [Improve][GPL][PHP / lighttpd] 3 years ago
zend_float.c c2d3f4474f [Improve][GPL][PHP / lighttpd] 3 years ago
zend_float.h c2d3f4474f [Improve][GPL][PHP / lighttpd] 3 years ago
zend_gc.c c2d3f4474f [Improve][GPL][PHP / lighttpd] 3 years ago
zend_gc.h c2d3f4474f [Improve][GPL][PHP / lighttpd] 3 years ago
zend_generators.c c2d3f4474f [Improve][GPL][PHP / lighttpd] 3 years ago
zend_generators.h c2d3f4474f [Improve][GPL][PHP / lighttpd] 3 years ago
zend_globals.h c2d3f4474f [Improve][GPL][PHP / lighttpd] 3 years ago
zend_globals_macros.h c2d3f4474f [Improve][GPL][PHP / lighttpd] 3 years ago
zend_hash.c c2d3f4474f [Improve][GPL][PHP / lighttpd] 3 years ago
zend_hash.h c2d3f4474f [Improve][GPL][PHP / lighttpd] 3 years ago
zend_highlight.c c2d3f4474f [Improve][GPL][PHP / lighttpd] 3 years ago
zend_highlight.h c2d3f4474f [Improve][GPL][PHP / lighttpd] 3 years ago
zend_inheritance.c c2d3f4474f [Improve][GPL][PHP / lighttpd] 3 years ago
zend_inheritance.h c2d3f4474f [Improve][GPL][PHP / lighttpd] 3 years ago
zend_ini.c c2d3f4474f [Improve][GPL][PHP / lighttpd] 3 years ago
zend_ini.h c2d3f4474f [Improve][GPL][PHP / lighttpd] 3 years ago
zend_ini_parser.y c2d3f4474f [Improve][GPL][PHP / lighttpd] 3 years ago
zend_ini_scanner.c c2d3f4474f [Improve][GPL][PHP / lighttpd] 3 years ago
zend_ini_scanner.h c2d3f4474f [Improve][GPL][PHP / lighttpd] 3 years ago
zend_ini_scanner.l c2d3f4474f [Improve][GPL][PHP / lighttpd] 3 years ago
zend_ini_scanner_defs.h c2d3f4474f [Improve][GPL][PHP / lighttpd] 3 years ago
zend_interfaces.c c2d3f4474f [Improve][GPL][PHP / lighttpd] 3 years ago
zend_interfaces.h c2d3f4474f [Improve][GPL][PHP / lighttpd] 3 years ago
zend_istdiostream.h c2d3f4474f [Improve][GPL][PHP / lighttpd] 3 years ago
zend_iterators.c c2d3f4474f [Improve][GPL][PHP / lighttpd] 3 years ago
zend_iterators.h c2d3f4474f [Improve][GPL][PHP / lighttpd] 3 years ago
zend_language_parser.y c2d3f4474f [Improve][GPL][PHP / lighttpd] 3 years ago
zend_language_scanner.c c2d3f4474f [Improve][GPL][PHP / lighttpd] 3 years ago
zend_language_scanner.h c2d3f4474f [Improve][GPL][PHP / lighttpd] 3 years ago
zend_language_scanner.l c2d3f4474f [Improve][GPL][PHP / lighttpd] 3 years ago
zend_language_scanner_defs.h c2d3f4474f [Improve][GPL][PHP / lighttpd] 3 years ago
zend_list.c c2d3f4474f [Improve][GPL][PHP / lighttpd] 3 years ago
zend_list.h c2d3f4474f [Improve][GPL][PHP / lighttpd] 3 years ago
zend_llist.c c2d3f4474f [Improve][GPL][PHP / lighttpd] 3 years ago
zend_llist.h c2d3f4474f [Improve][GPL][PHP / lighttpd] 3 years ago
zend_long.h c2d3f4474f [Improve][GPL][PHP / lighttpd] 3 years ago
zend_modules.h c2d3f4474f [Improve][GPL][PHP / lighttpd] 3 years ago
zend_multibyte.c c2d3f4474f [Improve][GPL][PHP / lighttpd] 3 years ago
zend_multibyte.h c2d3f4474f [Improve][GPL][PHP / lighttpd] 3 years ago
zend_multiply.h c2d3f4474f [Improve][GPL][PHP / lighttpd] 3 years ago
zend_object_handlers.c c2d3f4474f [Improve][GPL][PHP / lighttpd] 3 years ago
zend_object_handlers.h c2d3f4474f [Improve][GPL][PHP / lighttpd] 3 years ago
zend_objects.c c2d3f4474f [Improve][GPL][PHP / lighttpd] 3 years ago
zend_objects.h c2d3f4474f [Improve][GPL][PHP / lighttpd] 3 years ago
zend_objects_API.c c2d3f4474f [Improve][GPL][PHP / lighttpd] 3 years ago
zend_objects_API.h c2d3f4474f [Improve][GPL][PHP / lighttpd] 3 years ago
zend_opcode.c c2d3f4474f [Improve][GPL][PHP / lighttpd] 3 years ago
zend_operators.c c2d3f4474f [Improve][GPL][PHP / lighttpd] 3 years ago
zend_operators.h c2d3f4474f [Improve][GPL][PHP / lighttpd] 3 years ago
zend_portability.h c2d3f4474f [Improve][GPL][PHP / lighttpd] 3 years ago
zend_ptr_stack.c c2d3f4474f [Improve][GPL][PHP / lighttpd] 3 years ago
zend_ptr_stack.h c2d3f4474f [Improve][GPL][PHP / lighttpd] 3 years ago
zend_range_check.h c2d3f4474f [Improve][GPL][PHP / lighttpd] 3 years ago
zend_signal.c c2d3f4474f [Improve][GPL][PHP / lighttpd] 3 years ago
zend_signal.h c2d3f4474f [Improve][GPL][PHP / lighttpd] 3 years ago
zend_smart_str.c c2d3f4474f [Improve][GPL][PHP / lighttpd] 3 years ago
zend_smart_str.h c2d3f4474f [Improve][GPL][PHP / lighttpd] 3 years ago
zend_smart_str_public.h c2d3f4474f [Improve][GPL][PHP / lighttpd] 3 years ago
zend_smart_string.h c2d3f4474f [Improve][GPL][PHP / lighttpd] 3 years ago
zend_smart_string_public.h c2d3f4474f [Improve][GPL][PHP / lighttpd] 3 years ago
zend_sort.c c2d3f4474f [Improve][GPL][PHP / lighttpd] 3 years ago
zend_sort.h c2d3f4474f [Improve][GPL][PHP / lighttpd] 3 years ago
zend_sprintf.c c2d3f4474f [Improve][GPL][PHP / lighttpd] 3 years ago
zend_stack.c c2d3f4474f [Improve][GPL][PHP / lighttpd] 3 years ago
zend_stack.h c2d3f4474f [Improve][GPL][PHP / lighttpd] 3 years ago
zend_stream.c c2d3f4474f [Improve][GPL][PHP / lighttpd] 3 years ago
zend_stream.h c2d3f4474f [Improve][GPL][PHP / lighttpd] 3 years ago
zend_string.c c2d3f4474f [Improve][GPL][PHP / lighttpd] 3 years ago
zend_string.h c2d3f4474f [Improve][GPL][PHP / lighttpd] 3 years ago
zend_strtod.c c2d3f4474f [Improve][GPL][PHP / lighttpd] 3 years ago
zend_strtod.h c2d3f4474f [Improve][GPL][PHP / lighttpd] 3 years ago
zend_strtod_int.h c2d3f4474f [Improve][GPL][PHP / lighttpd] 3 years ago
zend_ts_hash.c c2d3f4474f [Improve][GPL][PHP / lighttpd] 3 years ago
zend_ts_hash.h c2d3f4474f [Improve][GPL][PHP / lighttpd] 3 years ago
zend_type_info.h c2d3f4474f [Improve][GPL][PHP / lighttpd] 3 years ago
zend_types.h c2d3f4474f [Improve][GPL][PHP / lighttpd] 3 years ago
zend_variables.c c2d3f4474f [Improve][GPL][PHP / lighttpd] 3 years ago
zend_variables.h c2d3f4474f [Improve][GPL][PHP / lighttpd] 3 years ago
zend_virtual_cwd.c c2d3f4474f [Improve][GPL][PHP / lighttpd] 3 years ago
zend_virtual_cwd.h c2d3f4474f [Improve][GPL][PHP / lighttpd] 3 years ago
zend_vm.h c2d3f4474f [Improve][GPL][PHP / lighttpd] 3 years ago
zend_vm_def.h c2d3f4474f [Improve][GPL][PHP / lighttpd] 3 years ago
zend_vm_execute.h c2d3f4474f [Improve][GPL][PHP / lighttpd] 3 years ago
zend_vm_execute.skl c2d3f4474f [Improve][GPL][PHP / lighttpd] 3 years ago
zend_vm_gen.php c2d3f4474f [Improve][GPL][PHP / lighttpd] 3 years ago
zend_vm_handlers.h c2d3f4474f [Improve][GPL][PHP / lighttpd] 3 years ago
zend_vm_opcodes.c c2d3f4474f [Improve][GPL][PHP / lighttpd] 3 years ago
zend_vm_opcodes.h c2d3f4474f [Improve][GPL][PHP / lighttpd] 3 years ago
zend_vm_trace_handlers.h c2d3f4474f [Improve][GPL][PHP / lighttpd] 3 years ago
zend_vm_trace_map.h c2d3f4474f [Improve][GPL][PHP / lighttpd] 3 years ago

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

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.