Update realloc_raw docstring

This commit is contained in:
2025-08-19 14:31:42 -04:00
parent ecfb7f3307
commit 33fd8bb705

View File

@@ -237,6 +237,10 @@ public:
* - The old pointer becomes invalid if a copy occurs
* - Like malloc/realloc, the contents beyond old_size are uninitialized
* - When copying to new location, uses the specified alignment
* - **Shrinking behavior**: If `new_size < old_size` and the allocation
* is *not* the most recent one, this function returns the original
* pointer, but **no memory is reclaimed**. The arena design does not
* support freeing memory from the middle of a block.
*/
void *realloc_raw(void *ptr, uint32_t old_size, uint32_t new_size,
uint32_t alignment = alignof(std::max_align_t));