Thread with 3 posts

jump to expanded post

are 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?

Open thread at this post