HeapBlock doesn't know it's size?

HeapBlock has no size() method. I am guessing that Jules wanted the the footprint of the class to be no different from a regular pointer. But I am keeping a cache of HeapBlock and I return a HeapBlock* from a function that gets an available block from the cache, and the receiving function can’t determine the size of the block.

I suppose I could wrap it in a template but it would be nice if there was a HeapBlockWithSize class.

Or if you think this is all crazy talk then ignore this post, I’m rambling.

You could use a MemoryBlock for that?

Seems like you’re always one step ahead of me!

Can’t beat the master… :smiley: