8053 beefd0184a 2022-08-08 ct_chen 2 سال پیش
..
RFCs beefd0184a 2022-08-08 ct_chen 2 سال پیش
tests beefd0184a 2022-08-08 ct_chen 2 سال پیش
LICENSE beefd0184a 2022-08-08 ct_chen 2 سال پیش
Makefile.am beefd0184a 2022-08-08 ct_chen 2 سال پیش
Makefile.frag beefd0184a 2022-08-08 ct_chen 2 سال پیش
OBJECTS2_HOWTO beefd0184a 2022-08-08 ct_chen 2 سال پیش
README.ZEND_MM beefd0184a 2022-08-08 ct_chen 2 سال پیش
README.ZEND_VM beefd0184a 2022-08-08 ct_chen 2 سال پیش
ZEND_CHANGES beefd0184a 2022-08-08 ct_chen 2 سال پیش
Zend.dsp beefd0184a 2022-08-08 ct_chen 2 سال پیش
Zend.m4 beefd0184a 2022-08-08 ct_chen 2 سال پیش
ZendCore.dep beefd0184a 2022-08-08 ct_chen 2 سال پیش
ZendTS.dsp beefd0184a 2022-08-08 ct_chen 2 سال پیش
acinclude.m4 beefd0184a 2022-08-08 ct_chen 2 سال پیش
bench.php beefd0184a 2022-08-08 ct_chen 2 سال پیش
buildconf beefd0184a 2022-08-08 ct_chen 2 سال پیش
configure.in beefd0184a 2022-08-08 ct_chen 2 سال پیش
header beefd0184a 2022-08-08 ct_chen 2 سال پیش
micro_bench.php beefd0184a 2022-08-08 ct_chen 2 سال پیش
zend.c beefd0184a 2022-08-08 ct_chen 2 سال پیش
zend.h beefd0184a 2022-08-08 ct_chen 2 سال پیش
zend.ico beefd0184a 2022-08-08 ct_chen 2 سال پیش
zend_API.c beefd0184a 2022-08-08 ct_chen 2 سال پیش
zend_API.h beefd0184a 2022-08-08 ct_chen 2 سال پیش
zend_alloc.c beefd0184a 2022-08-08 ct_chen 2 سال پیش
zend_alloc.h beefd0184a 2022-08-08 ct_chen 2 سال پیش
zend_ast.c beefd0184a 2022-08-08 ct_chen 2 سال پیش
zend_ast.h beefd0184a 2022-08-08 ct_chen 2 سال پیش
zend_build.h beefd0184a 2022-08-08 ct_chen 2 سال پیش
zend_builtin_functions.c beefd0184a 2022-08-08 ct_chen 2 سال پیش
zend_builtin_functions.h beefd0184a 2022-08-08 ct_chen 2 سال پیش
zend_closures.c beefd0184a 2022-08-08 ct_chen 2 سال پیش
zend_closures.h beefd0184a 2022-08-08 ct_chen 2 سال پیش
zend_compile.c beefd0184a 2022-08-08 ct_chen 2 سال پیش
zend_compile.h beefd0184a 2022-08-08 ct_chen 2 سال پیش
zend_config.nw.h beefd0184a 2022-08-08 ct_chen 2 سال پیش
zend_config.w32.h beefd0184a 2022-08-08 ct_chen 2 سال پیش
zend_constants.c beefd0184a 2022-08-08 ct_chen 2 سال پیش
zend_constants.h beefd0184a 2022-08-08 ct_chen 2 سال پیش
zend_default_classes.c beefd0184a 2022-08-08 ct_chen 2 سال پیش
zend_dtrace.c beefd0184a 2022-08-08 ct_chen 2 سال پیش
zend_dtrace.d beefd0184a 2022-08-08 ct_chen 2 سال پیش
zend_dtrace.h beefd0184a 2022-08-08 ct_chen 2 سال پیش
zend_dynamic_array.c beefd0184a 2022-08-08 ct_chen 2 سال پیش
zend_dynamic_array.h beefd0184a 2022-08-08 ct_chen 2 سال پیش
zend_errors.h beefd0184a 2022-08-08 ct_chen 2 سال پیش
zend_exceptions.c beefd0184a 2022-08-08 ct_chen 2 سال پیش
zend_exceptions.h beefd0184a 2022-08-08 ct_chen 2 سال پیش
zend_execute.c beefd0184a 2022-08-08 ct_chen 2 سال پیش
zend_execute.h beefd0184a 2022-08-08 ct_chen 2 سال پیش
zend_execute_API.c beefd0184a 2022-08-08 ct_chen 2 سال پیش
zend_extensions.c beefd0184a 2022-08-08 ct_chen 2 سال پیش
zend_extensions.h beefd0184a 2022-08-08 ct_chen 2 سال پیش
zend_float.c beefd0184a 2022-08-08 ct_chen 2 سال پیش
zend_float.h beefd0184a 2022-08-08 ct_chen 2 سال پیش
zend_gc.c beefd0184a 2022-08-08 ct_chen 2 سال پیش
zend_gc.h beefd0184a 2022-08-08 ct_chen 2 سال پیش
zend_generators.c beefd0184a 2022-08-08 ct_chen 2 سال پیش
zend_generators.h beefd0184a 2022-08-08 ct_chen 2 سال پیش
zend_globals.h beefd0184a 2022-08-08 ct_chen 2 سال پیش
zend_globals_macros.h beefd0184a 2022-08-08 ct_chen 2 سال پیش
zend_hash.c beefd0184a 2022-08-08 ct_chen 2 سال پیش
zend_hash.h beefd0184a 2022-08-08 ct_chen 2 سال پیش
zend_highlight.c beefd0184a 2022-08-08 ct_chen 2 سال پیش
zend_highlight.h beefd0184a 2022-08-08 ct_chen 2 سال پیش
zend_indent.c beefd0184a 2022-08-08 ct_chen 2 سال پیش
zend_indent.h beefd0184a 2022-08-08 ct_chen 2 سال پیش
zend_ini.c beefd0184a 2022-08-08 ct_chen 2 سال پیش
zend_ini.h beefd0184a 2022-08-08 ct_chen 2 سال پیش
zend_ini_parser.y beefd0184a 2022-08-08 ct_chen 2 سال پیش
zend_ini_scanner.c beefd0184a 2022-08-08 ct_chen 2 سال پیش
zend_ini_scanner.h beefd0184a 2022-08-08 ct_chen 2 سال پیش
zend_ini_scanner.l beefd0184a 2022-08-08 ct_chen 2 سال پیش
zend_ini_scanner_defs.h beefd0184a 2022-08-08 ct_chen 2 سال پیش
zend_interfaces.c beefd0184a 2022-08-08 ct_chen 2 سال پیش
zend_interfaces.h beefd0184a 2022-08-08 ct_chen 2 سال پیش
zend_istdiostream.h beefd0184a 2022-08-08 ct_chen 2 سال پیش
zend_iterators.c beefd0184a 2022-08-08 ct_chen 2 سال پیش
zend_iterators.h beefd0184a 2022-08-08 ct_chen 2 سال پیش
zend_language_parser.y beefd0184a 2022-08-08 ct_chen 2 سال پیش
zend_language_scanner.c beefd0184a 2022-08-08 ct_chen 2 سال پیش
zend_language_scanner.h beefd0184a 2022-08-08 ct_chen 2 سال پیش
zend_language_scanner.l beefd0184a 2022-08-08 ct_chen 2 سال پیش
zend_language_scanner_defs.h beefd0184a 2022-08-08 ct_chen 2 سال پیش
zend_list.c beefd0184a 2022-08-08 ct_chen 2 سال پیش
zend_list.h beefd0184a 2022-08-08 ct_chen 2 سال پیش
zend_llist.c beefd0184a 2022-08-08 ct_chen 2 سال پیش
zend_llist.h beefd0184a 2022-08-08 ct_chen 2 سال پیش
zend_modules.h beefd0184a 2022-08-08 ct_chen 2 سال پیش
zend_multibyte.c beefd0184a 2022-08-08 ct_chen 2 سال پیش
zend_multibyte.h beefd0184a 2022-08-08 ct_chen 2 سال پیش
zend_multiply.h beefd0184a 2022-08-08 ct_chen 2 سال پیش
zend_object_handlers.c beefd0184a 2022-08-08 ct_chen 2 سال پیش
zend_object_handlers.h beefd0184a 2022-08-08 ct_chen 2 سال پیش
zend_objects.c beefd0184a 2022-08-08 ct_chen 2 سال پیش
zend_objects.h beefd0184a 2022-08-08 ct_chen 2 سال پیش
zend_objects_API.c beefd0184a 2022-08-08 ct_chen 2 سال پیش
zend_objects_API.h beefd0184a 2022-08-08 ct_chen 2 سال پیش
zend_opcode.c beefd0184a 2022-08-08 ct_chen 2 سال پیش
zend_operators.c beefd0184a 2022-08-08 ct_chen 2 سال پیش
zend_operators.h beefd0184a 2022-08-08 ct_chen 2 سال پیش
zend_ptr_stack.c beefd0184a 2022-08-08 ct_chen 2 سال پیش
zend_ptr_stack.h beefd0184a 2022-08-08 ct_chen 2 سال پیش
zend_qsort.c beefd0184a 2022-08-08 ct_chen 2 سال پیش
zend_qsort.h beefd0184a 2022-08-08 ct_chen 2 سال پیش
zend_signal.c beefd0184a 2022-08-08 ct_chen 2 سال پیش
zend_signal.h beefd0184a 2022-08-08 ct_chen 2 سال پیش
zend_sprintf.c beefd0184a 2022-08-08 ct_chen 2 سال پیش
zend_stack.c beefd0184a 2022-08-08 ct_chen 2 سال پیش
zend_stack.h beefd0184a 2022-08-08 ct_chen 2 سال پیش
zend_static_allocator.c beefd0184a 2022-08-08 ct_chen 2 سال پیش
zend_static_allocator.h beefd0184a 2022-08-08 ct_chen 2 سال پیش
zend_stream.c beefd0184a 2022-08-08 ct_chen 2 سال پیش
zend_stream.h beefd0184a 2022-08-08 ct_chen 2 سال پیش
zend_string.c beefd0184a 2022-08-08 ct_chen 2 سال پیش
zend_string.h beefd0184a 2022-08-08 ct_chen 2 سال پیش
zend_strtod.c beefd0184a 2022-08-08 ct_chen 2 سال پیش
zend_strtod.h beefd0184a 2022-08-08 ct_chen 2 سال پیش
zend_ts_hash.c beefd0184a 2022-08-08 ct_chen 2 سال پیش
zend_ts_hash.h beefd0184a 2022-08-08 ct_chen 2 سال پیش
zend_types.h beefd0184a 2022-08-08 ct_chen 2 سال پیش
zend_variables.c beefd0184a 2022-08-08 ct_chen 2 سال پیش
zend_variables.h beefd0184a 2022-08-08 ct_chen 2 سال پیش
zend_virtual_cwd.c beefd0184a 2022-08-08 ct_chen 2 سال پیش
zend_virtual_cwd.h beefd0184a 2022-08-08 ct_chen 2 سال پیش
zend_vm.h beefd0184a 2022-08-08 ct_chen 2 سال پیش
zend_vm_def.h beefd0184a 2022-08-08 ct_chen 2 سال پیش
zend_vm_execute.h beefd0184a 2022-08-08 ct_chen 2 سال پیش
zend_vm_execute.skl beefd0184a 2022-08-08 ct_chen 2 سال پیش
zend_vm_gen.php beefd0184a 2022-08-08 ct_chen 2 سال پیش
zend_vm_opcodes.c beefd0184a 2022-08-08 ct_chen 2 سال پیش
zend_vm_opcodes.h beefd0184a 2022-08-08 ct_chen 2 سال پیش

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.