diff options
author | giraffedata <giraffedata@9d0c8265-081b-0410-96cb-a4ca84ce46f8> | 2024-06-28 23:33:22 +0000 |
---|---|---|
committer | giraffedata <giraffedata@9d0c8265-081b-0410-96cb-a4ca84ce46f8> | 2024-06-28 23:33:22 +0000 |
commit | 982e93698739baf42752921bc77f6684ec5c754c (patch) | |
tree | 50c32a81e41526dc9b0b78ec603e34555450e14a /lib/util | |
parent | 2ea6cbec549e46141e1212436db4dae5f1652f9b (diff) | |
download | netpbm-mirror-advanced.tar.gz netpbm-mirror-advanced.tar.xz netpbm-mirror-advanced.zip |
Promote Development to Advanced advanced
git-svn-id: http://svn.code.sf.net/p/netpbm/code/advanced@4925 9d0c8265-081b-0410-96cb-a4ca84ce46f8
Diffstat (limited to 'lib/util')
-rw-r--r-- | lib/util/mallocvar.h | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/lib/util/mallocvar.h b/lib/util/mallocvar.h index 16452702..73498357 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 |