|
"When calling constructor, compiler will request OS to allocate memory space to hold the new object. OS return the base address and then compiler will assign it 'this' segment."
When I come across above words in the book, some questions arise.
1. Does this process happen in every object-oriented language like Javascript, Java...
2. 'Compiler will request OS to allocate memory'. Does compiler request OS by translating the code into VM code? From my standpoint, compiler just do the translation stuff passively, like taking the input and providing output. Hard to imagine it is actively 'requesting' something.
Thank you very much in advance.
|