This depends on the compiler and to some extent on the language.  But
in most cases, temporary values are stored in registers first.  When
there are not enough registers,  the compiler spills them into space
allocated in a stack activation record so that the space is
automatically reclaimed when the current activation of the current
procedure is popped. The only compilers I've ever seen allocate
temporaries on a heap are for functional languages that use no stack
at all. Appel's ML compiler is one I can remember off hand.

Gene

On Aug 5, 1:36 am, krishna meena <krishna.meena...@gmail.com> wrote:
> For any compiler generated temporaries the space is allocated in run
> time heap only?

-- 
You received this message because you are subscribed to the Google Groups 
"Algorithm Geeks" group.
To post to this group, send email to algogeeks@googlegroups.com.
To unsubscribe from this group, send email to 
algogeeks+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/algogeeks?hl=en.

Reply via email to