Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Newer
Older
100644 35 lines (23 sloc) 1.031 kB
184b2e5 MFH
Jani Taskinen authored
1 Zend Memory Manager
2 ===================
92f080a Missing file..
foobar authored
3
184b2e5 MFH
Jani Taskinen authored
4 General:
5 --------
92f080a Missing file..
foobar authored
6
184b2e5 MFH
Jani Taskinen authored
7 The goal of the new memory manager (available since PHP 5.2) is to reduce memory
8 allocation overhead and speedup memory management.
92f080a Missing file..
foobar authored
9
184b2e5 MFH
Jani Taskinen authored
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.
92f080a Missing file..
foobar authored
15
184b2e5 MFH
Jani Taskinen authored
16 Debugging:
17 ----------
92f080a Missing file..
foobar authored
18
184b2e5 MFH
Jani Taskinen authored
19 Normal:
92f080a Missing file..
foobar authored
20
184b2e5 MFH
Jani Taskinen authored
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.
Something went wrong with that request. Please try again.