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 12.19a). After this part becomes full, the garbage collector cleans it by copying all reachable cells to the upper part (Figure 12.19b), 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 12.19c). 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 12.19d), and then all reachable cells are copied to the beginning of the upper part (Figure 12.19e).
2 freelancer đang chào giá trung bình $40 cho công việc này
Hi I am software engineer and have done many programming projects. You can share more details with me and if possible we can negotiate the price. Thank you