about summary refs log tree commit diff
path: root/lib
diff options
context:
space:
mode:
authorgiraffedata <giraffedata@9d0c8265-081b-0410-96cb-a4ca84ce46f8>2024-04-11 20:54:00 +0000
committergiraffedata <giraffedata@9d0c8265-081b-0410-96cb-a4ca84ce46f8>2024-04-11 20:54:00 +0000
commitb336d2147f09c60d43aefc15e6bffeaf2ba2d20e (patch)
tree98d8f5421ed9b2f1766f651478192bc5c8816eaf /lib
parent182cb1b68e40b2e1d900b3ccd7a5ee7de818a9f4 (diff)
downloadnetpbm-mirror-b336d2147f09c60d43aefc15e6bffeaf2ba2d20e.tar.gz
netpbm-mirror-b336d2147f09c60d43aefc15e6bffeaf2ba2d20e.tar.xz
netpbm-mirror-b336d2147f09c60d43aefc15e6bffeaf2ba2d20e.zip
add comments
git-svn-id: http://svn.code.sf.net/p/netpbm/code/trunk@4904 9d0c8265-081b-0410-96cb-a4ca84ce46f8
Diffstat (limited to 'lib')
-rw-r--r--lib/util/mallocvar.h11
1 files changed, 11 insertions, 0 deletions
diff --git a/lib/util/mallocvar.h b/lib/util/mallocvar.h
index 23b28c40..0b3794f4 100644
--- a/lib/util/mallocvar.h
+++ b/lib/util/mallocvar.h
@@ -67,7 +67,18 @@ static __inline__ void
 reallocProduct(void **      const blockP,
                size_t       const factor1,
                unsigned int const factor2) {
+/*----------------------------------------------------------------------------
+   Reallocate the block at *blockPP to size 'factor1' * 'factor2'.
+   (Reallocate means make *blockPP point to a block of that size that
+   contains the same data as the block to which *blockP points now, with
+   additional space as needed at the end).
+
+   If *blockPP is null, make *blockPP point to a new block of memory of
+   the desired size with no contents.
 
+   If the reallocation fails, release any memory pointed by *blockP and
+   make *blockP null.
+-----------------------------------------------------------------------------*/
     size_t const sizeMax =
 #if defined(SIZE_MAX)
         SIZE_MAX