From b336d2147f09c60d43aefc15e6bffeaf2ba2d20e Mon Sep 17 00:00:00 2001 From: giraffedata Date: Thu, 11 Apr 2024 20:54:00 +0000 Subject: add comments git-svn-id: http://svn.code.sf.net/p/netpbm/code/trunk@4904 9d0c8265-081b-0410-96cb-a4ca84ce46f8 --- lib/util/mallocvar.h | 11 +++++++++++ 1 file changed, 11 insertions(+) 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 -- cgit 1.4.1