]> git.puffer.fish Git - mirror/frr.git/commitdiff
doc: add description of the new memory macro 7632/head
authorIgor Ryzhov <iryzhov@nfware.com>
Tue, 1 Dec 2020 08:39:40 +0000 (11:39 +0300)
committerIgor Ryzhov <iryzhov@nfware.com>
Tue, 1 Dec 2020 08:39:40 +0000 (11:39 +0300)
Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
doc/developer/memtypes.rst

index e04049001d9e569098c364c4ef509602f33ad47e..952b316ea0b208392207b8db1aec6cf7050363bd 100644 (file)
@@ -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()``.