jeudi 29 janvier 2015

Where machine instructions of a program stored during runtime?

So far as I know, whenever we run any program, the machine instructions of the program is loaded in RAM. Again, there are two regions of memory: stack and heap.


My question is: Which region of memory the machine instruction stored in? stack or heap?


I learnt that the following program gives a runtime error though there is no variable declared inside the function. The reason behind this is the overflow of stack. Then should I assume that the machines instructions of the function is stored in stack?





int func()
{
return func();
}



Aucun commentaire:

Enregistrer un commentaire