Original Post
I'm currently working on a little compiler/virtual machine project which is all going swimmingly but I want to extend it to have a heap so I can support string concatenation. I was just wondering how a real compiler knows how much memory to free when you call delete or delete[]. I was thinking about prefixing allocated chunks with a value that represents the amount of memory allocated but that seems like a bit of a hack. Ta.