Tuesday 12 August 2014

Buddy blocks

In this technique, memory is apportioned in to several pools of memory in lieu of , where each pool represents blocks of memory of a sure power of in size. All blocks of a specific size are kept in a sorted linked list or tree and all new blocks that are formed in the work of allocation are added to their respective memory pools for later use. If a smaller size is requested than is obtainable, the smallest obtainable size is chosen and halved. of the resulting halves is chosen, and the technique repeats until the request is complete. When a block is apportioned, the allocator will start with the smallest sufficiently massive block to keep away from needlessly breaking blocks. When a block is freed, it is compared to its buddy. In the event that they are both free, they are combined and placed in the next-largest size buddy-block list.

No comments:

Post a Comment