General Purpose Allocator and MergeIfPossible

Hey,

i think in your implementation of MergeIfPossible you're missing to merge with all free chunks of memory. Let's say you have a Chunk A (which is free), B (in use), and C (free). After freeing B you'll merge B with C, but miss the oportunity to merge with A.

Unless i'm missing something obvious.
Please look at the call site for MergeIfPossible and note that it is called twice, once for B-C (in your example) and once for A-B. If you still think there is a problem, please let me know what it is and I'll take a look!

- Casey
Yep, right you are. Sorry for the noise.
No problem at all - it is always better to be safe than sorry!

- Casey