3 ms·
Sure, that explains it. The VM has to allocate memory if it's interpreting a dynamic language. Sorry if the question was elementary.
by joe_the_user 9y ago
Sure, that explains it. The VM has to allocate memory if it's interpreting a dynamic language. Sorry if the question was elementary.
- chubot 9y agoOK no problem, it would be interesting to see a comparison between the two styles of VM! I remember that there is at least one talk here which goes into the difference: http://soft-dev.org/events/vmss16/ http://soft-dev.org/events/vmss16/ I forget what the different names he used. He distinguished between runtimes like the JVM and runtimes like Xen, which emulate an operating system too. A CPU emulator seems closer to Xen than the JVM. ----- EDIT: The names were "system" and "process" VMs, mentioned here: https://news.ycombinator.com/item?id=16777564 https://news.ycombinator.com/item?id=16777564 So I think you are talking about a "system VM", where this book is more about "process" VMs. They are related, but distinct -- it even says so in that book's title! It's definitely true that in something like Xen you would want to avoid allocating memory more than in something like a JavaScript VM. (And it would be easier to avoid allocating, too.) I don't like that terminology, but it's a useful distinction.
- 35bge57dtjku 9y agoI don't think it's because it's a dynamic language like you seem to imply. How else would you implement both stack and heap in non-'dynamic' languages without constraining them to a fixed size?