From fdac05fd9ab9d7f09f750243d0f4a97b25d389a1 Mon Sep 17 00:00:00 2001 From: Igor Ryzhov Date: Tue, 1 Dec 2020 11:39:40 +0300 Subject: [PATCH] doc: add description of the new memory macro Signed-off-by: Igor Ryzhov --- doc/developer/memtypes.rst | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/doc/developer/memtypes.rst b/doc/developer/memtypes.rst index e04049001d..952b316ea0 100644 --- a/doc/developer/memtypes.rst +++ b/doc/developer/memtypes.rst @@ -131,3 +131,10 @@ Usage - if ptr is NULL, no operation is performed (as is guaranteed by system implementations.) Do not surround XFREE with ``if (ptr != NULL)`` checks. + +.. c:function:: void XCOUNTFREE(struct memtype *mtype, void *ptr) + + This macro is used to count the ``ptr`` as freed without actually freeing + it. This may be needed in some very specific cases, for example, when the + ``ptr`` was allocated using any of the above wrappers and will be freed + by some external library using simple ``free()``. -- 2.39.5