Choose each questions whether can or cannot 1. An allocator (can/cannot) move al
ID: 3796564 • Letter: C
Question
Choose each questions whether can or cannot
1. An allocator (can/cannot) move allocated blocks to the end of the heap to maximaize throughput.
2. An allocator (can/cannot) pad a heap block to meet memory alignment requirements
3. An allocator (can/cannot) handle heap requests in an arbitrary order by reordering them to improve heap memory utilization.
4. An allocator (can/cannot) use the uninitialized data segment to satisfy heap requests if needed
5. An allocator (can/cannot) create larger free blocks by coalescing adjacent free blocks when needed
Explanation / Answer
1. An allocator cannot move allocated block to the end of the heap to maximize the throughput. However, it collects garbage to increase the throughput.
2. An allocator can pad a heap block to meet memory alignment requirements. This processor is called compaction that merges free objects in one to create larger blocks.
3. An allocator cannot handle heap requests in an arbitrary order by reordering them to improve heap memory utilization. For each request, allocator searches for free space by applying different strategies like Best-fir or Next-Fit. But, requests are never ordered.
4. An allocator cannot use the uninitialized data segment to satisfy heap requests if needed.
5. An allocator can create larger free blocks by coalescing adjacent free blocks when needed. This process is called as Compaction. It is used when an application frees the memory, that can lead to the gaps.