A function may have many different activation records during the execution of a
ID: 3741630 • Letter: A
Question
A function may have many different activation records during the execution of a program, since it may be called many times. Language implementations usually gather all the activation-specific variables and other activation-specific data together into one block of memory called an activation record. Statically means allocate one for each function before the program begins running.
Write the shortest ML function you can that would not work correctly if implemented using simple, stack-allocated activation records (without nested links)? *AND* Explain why it would fail?
Explanation / Answer
First I'll expline that Activation record can be implemented on Heap not stack.
So it will be fail when you write the function Push() and Pop() ,
It will stroes the Garbage collection .
combination of nested links will be return result(high order functions)
focussed on current activation record if it is above 8 garbage is collected?
ML function is
Creating Activation record:
Control Links:
Access 6links
Binding:
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.