Download code into memory on the different programming languages?

0 like 0 dislike
7 views
I read somewhere, but never found again that all the JS code is loaded into RAM and then runs. That is logical.

In other languages, or are there differences?

Interested in C, C++, Java, C#, PHP.
by | 7 views

2 Answers

0 like 0 dislike
The most primitive of shells, for example bash reads the script file from disc line by line and simultaneously perform each read line. Conventional interpreters read the file, analyze the code, build an AST and have it perform. Sophisticated interpreters (such as PHP, Javascript V8 and CPython) after building the AST, compile it into bytecode and execute the bytecode already. This files most often have this bytecode interpreted languages remains only in memory and not saved to disk. In contrast, in Java and C#, the stages of analysis code and compile it into bytecode is separated from the runtime bytecode. The compiled code is saved in a file and after running the virtual machine. Compiled languages (C, C++ and other) compile the AST into bytecode not, and once in machine code. However, they are lately increasingly using LLVM.
by
0 like 0 dislike
For compiled languages:
1. There are overlay structures that are loaded on demand into memory but it is those times when DOS was
2. There are plugins which are dll and not necessarily loaded when the program starts

For interpreted - it seems logical that downloaded into memory and prointerpretirovana.
by

Related questions

0 like 0 dislike
6 answers
0 like 0 dislike
6 answers
110,608 questions
257,186 answers
0 comments
33,949 users