Runtime Flashcards

1
Q

activation record

A

data structure used to hold information relevant to one method call

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

static allocation

A

no heap or stack, all allocation records are in same static data area, one per method

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

advantages of static allocation

A

fast access to names (no need to compute address of variable at runtime)
no overhead of stack/heap manipulation
no overhead of stack/heap manipulation

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

disadvantages of static allocation

A

no recursion

no dynamic allocation

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

Calling method for static allocation

A

copies each arg into the corresponding space in the called method’s AR
jump/link - jump to the first instruction of called method, put return address in return addr register

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

Called method for static allocation

A

save regiters, initialize local data, copy return addr into return addr field

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

stack allocation

A

each time a method called, new AR pushed onto stack, popped when method returns

How well did you know this?
1
Not at all
2
3
4
5
Perfectly