Thank you both for your suggestions and insights. I think i can limit memory allocation to phases of patch loading. So my idea is to have a memory pool that controls the entire chunk of SDRAM and houses sample data and meta data with the design goal of being able to completely drain that pool when another patch is loaded. This way it should be possible to avoid fragmentation and keep tabs on memory usage. I’ll keep your suggestion of not assuming continuous memory i mind during design.