When I was learning .NET I saw it as a platform that runs my .NET programs which has its own Stack & Heap.
But now after learning more about things, I see a .NET application as just like any other C/C++ native application. It is in Portable Executable (PE) file format with new data directory & .text section is filled with MSIL code instead of machine code. The only difference is few DLLs (which are considered as .NET platform) (like any other Dll dependency) are loaded.
I guess at the very entry point there is some machine code which calls into the loaded DLL(.net platform) and functions of those DLL read the MSIL from .text section (segment to be more correct) and generate equivalent machine code and put it in some kind of buffer (I don't know which area would it be it. I cannot be .text & .data as they are readonly. will they be stack or heap?). Then make the EIP point to this buffer of instructions. Last few instructions again call back into DLLs to repeat the process for rest of MSIL.
As of Managed Heap
& Managed Stack
they are just some portion of the processes heap & stack. its just that few functions (referred to as GC) will keep track of the memory allocations & deallocations from this portions of memory.
I like this realistic view. I don't know how far I'm true. I'm just guessing these things. Please correct me & tell me more about this. How far will is it similar to this view? Where can I learn more about .NET platform from this point of view?
. NET Framework is a software development framework for building and running applications on Windows. . NET Framework is part of the . NET platform, a collection of technologies for building apps for Linux, macOS, Windows, iOS, Android, and more.
A cross-platform and open-source framework, . NET Core is best when developing applications on any platform. . NET Core is used for cloud applications or refactoring large enterprise applications into microservices. You should use .
The . NET Framework is an open-source developer platform you can use to create a broad range of applications. This free cross-platform framework accepts multiple coding languages and features large code libraries that make it easy to build applications for mobile devices, desktops, the web and the Internet of Things.
You missed one very important point - CIL code (formerly MSIL) is safe code. You cannot do arbitrary pointer voodoo, type casting or similar evil things (except for some in unsafe code regions). This is probably the most important difference to other languages like C(++), Pascal and so on. This safety guarantees are deeply build into the language, type system and runtime design.
For CLR check : CLR via C#.
It is really a great book especially if you are interested in "low level" .NET/CLR.
For JVM check : Java Virtual Machine
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With