I'm facing a task similar to what filesystems do. I have a bunch of continuous allocated space and I need to place pieces of variable length data into it, each piece of data can change size over time.
Now I could just place the pieces one after another as they come, then when they grow too big to fit I'd fragment the data or move the whole thing or whatever. To me it seems like a recipe for a fragmented mess though.
I'm sure there is no way to avoid a mess completely but I'd like to keep it to a minimum. Filesystems have to be using some cool strategies for placing data around the partition, right?
I do have some things to consider that differ from filesystems, like some data pieces I'd like to keep close together to be able to go through them with a sequential read.
Anyways, I tried googling the topic but was unable to find anything useful. Is there a special word for data distribution strategy? I'd like to see whats been done before, like for ext4 or ntfs.