From: Kevin Day Date: Sat, 30 Nov 2024 13:45:27 +0000 (-0600) Subject: Update: Add clarifying documentation to some memory allocation functions. X-Git-Tag: 0.7.0~24 X-Git-Url: https://git.kevux.org/?a=commitdiff_plain;h=eb35276b42925e69a158087b7d32ce5ac9f82bf7;p=fll Update: Add clarifying documentation to some memory allocation functions. --- diff --git a/level_0/f_memory/c/memory/array.h b/level_0/f_memory/c/memory/array.h index 2f5cc4e..078fde9 100644 --- a/level_0/f_memory/c/memory/array.h +++ b/level_0/f_memory/c/memory/array.h @@ -279,6 +279,9 @@ extern "C" { * This function is only useful for simple structures of the form "{ array, used, size }" where the array is a simple type. * If the simple type that is "array" requires additional memory manipulation on allocation, then do not use this function. * + * This does not guarantee the size increased to be increased by the given step. + * There may be some practices that result in the step being increased by a smaller amount. + * * @param step * The allocation step to use. * @@ -326,6 +329,8 @@ extern "C" { * This function is only useful for simple structures of the form "{ array, used, size }" where the array is a simple type. * If the simple type that is "array" requires additional memory manipulation on allocation, then do not use this function. * + * This does guarantee the size to be increased by the given amount, but only when (used + amount > size). + * * @param amount * A positive number representing how much to increase the size by. * @param width