Skip to main content
gamedev.net
๐Ÿ”’ Locked

Virtual machine question

Started by Aardvajk Apr 11, 2006 at 4:47 AM 1 replies 700+ views
Original Post
Aardvajk
Aardvajk
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.
Sharlin
Sharlin
That's precisely how most implementations do it :)

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.