CSCE 434 Lecture 29
Jump to navigation
Jump to search
« previous | Friday, November 1, 2013 | next »
Display vs. Access Links
Tradeoffs for one over other justified by:
- frequency of non-local accesses
- average lexical nesting depth
- ratio of calls to non-local access
Conventional wisdom:
- few registers = access links
- lots of registers = global display
- shallow average nesting = frame-based display
Parameter Passing
- Call by Value: no side-effects (apart from return value)
- Call by Reference: cannot guarantee that callee will not modify shared memory space
Variable argument length: caller can pass number of arguments as first parameter
Memory Management
alloc(k)
- allocate a block of at least bytes in the free space pool, removes it from the pool, and returns its address
free(p)
- places the block pointed to by back in the pool of free space for allocation
- marks memory space as dead (guaranteed not to be used again as the same code)
Different Allocation schemes