Thread with 2 posts
jump to expanded postare there any memory allocators that support partial freeing? suppose i’m doing a character encoding conversion and i cheaply estimate the amount of space required. after conversion i’ll find out maybe as much as half of the space isn’t actually needed. what if i could tell the allocator i don’t need it, so it can re-use it if possible, without moving the rest of my allocation?
I’m sure some implementations of realloc() do this but…