in Compiler Design retagged by
1,088 views
0 votes
0 votes
Consider the following sentences :

1. Static allocation binding do not change at run time

2. Heap Allocation allocate and deallocate at run time

Which of the above is true ?
in Compiler Design retagged by
by
1.1k views

3 Comments

it should be both right ? According to me for S2, heap deallocation responsibility do depend upon programming languages. in case Of C , it need to be done manually WHile in java there is automatic garbage collector , so deallocation can happen at run time . so how would i say s2 is right or not unless progarmminglangauages is not specified .
0
0
Even in manual deallocation in C, it is done at runtime only right?
1
1
oh yes . so it should be both
2
2

1 Answer

3 votes
3 votes
Best answer

Both the sentence is right. According to Aho-Ullman, Compiler Design book,

1) Static Allocation: It occurs before run-time and does not change during run-time

2) Dynamic Allocation: It occurs during run-time and changes during run-time

selected by
by

Related questions