| 30 | } |
| 31 | |
| 32 | void BHeap::freeAll(KMemory* memory) { |
| 33 | for (auto& page : pages) { |
| 34 | memory->unmap(page, K_PAGE_SIZE); |
| 35 | } |
| 36 | for (U32 i = 0; i < BHEAP_NUMBER_OF_BUCKETS; i++) { |
| 37 | bucket[i].clear(); |
| 38 | } |
| 39 | } |
| 40 | |
| 41 | U32 BHeap::alloc(KMemory* memory, KThread* thread, U32 len) { |
| 42 | U32 index = powerOf2(len + 4); |
no test coverage detected