CS 2420-20 Homework 18

Due: Thursday, March 31st, 2011 9:10am

Suppose a garbage-collected interepreter uses the following three kinds of records:

The interpreter has one register, which always contains a pointer, and a memory pool of size 22. The allocator/collector is a two-space copying collector, so each space is of size 11. Records are allocated consecutively in to-space, starting from the first memory location, 0.

The following is a snapshot of memory just before a collection where all memory has been allocated:

What are the values in the register and the new to-space (which is also addressed starting from 0) after collection? Assume that unallocated memory in to-space contains 0.

Last update: Thursday, April 7th, 2011