Problem

Implement a simple version of a generational garbage collector that uses only two regions...

Implement a simple version of a generational garbage collector that uses only two regions (Appel 1989). The heap is divided into two even parts. The upper part holds cells that have been copied from the lower part as cells reachable from the root pointers. The lower part is used for memory allocation and holds only newer cells (see Figure 1a). After this part becomes full, the garbage collector cleans it by copying all reachable cells to the upper part (Figure 1b), after which allocations are made starting from the beginning of the lower part. After several turns, the upper part becomes full, too, and the cells being copied from the lower part are in reality copied to the lower part (Figure 1c). In this case, the cleanup process of the upper part is begun by copying all reachable cells from the upper part to the lower part (Figure 1d), and then all reachable cells are copied to the beginning of the upper part (Figure 1e).

Figure 1 A heap with two regions for Appel’s generational garbage collection.

Step-by-Step Solution

Request Professional Solution

Request Solution!

We need at least 10 more requests to produce the solution.

0 / 10 have requested this problem solution

The more requests, the faster the answer.

Request! (Login Required)


All students who have requested the solution will be notified once they are available.
Add your Solution
Textbook Solutions and Answers Search
Solutions For Problems in Chapter 12
ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT