Skip to content

Commit bbe03ef

Browse files
author
Julien Pauli
committed
Fix ZendMM API
1 parent c748daa commit bbe03ef

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

Book/php7/memory_management/zend_memory_manager.rst

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -126,8 +126,9 @@ Whatever happens, pointers returned by ZendMM must be freed using ZendMM, aka ``
126126

127127
.. note:: A note on persistent allocations. Persistent allocations stay alive between requests. You traditionnaly use
128128
the common libc ``malloc/free`` to perform that, but ZendMM has got some shortcuts to libc allocator : the
129-
"persistent" API. This API starts by the *"p"* letter, hence a ``pemalloc()`` is nothing more than a
130-
``malloc()``, a ``pefree()`` is a ``free()`` and a ``pestrdup()`` is a ``strdup()``. Just to say.
129+
"persistent" API. This API starts by the *"p"* letter and let you choose between ZendMM alloc, or persistent
130+
alloc. Hence a ``pemalloc(<size>, 1)`` is nothing more than a ``malloc()``, a ``pefree(<ptr>, 1)`` is a
131+
``free()`` and a ``pestrdup(<ptr>, 1)`` is a ``strdup()``. Just to say.
131132

132133
Zend Memory Manager debugging shields
133134
*************************************

0 commit comments

Comments
 (0)