MCPcopy Create free account
hub / github.com/danoon2/Boxedwine / freeAll

Method freeAll

source/util/bheap.cpp:32–39  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

30}
31
32void 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
41U32 BHeap::alloc(KMemory* memory, KThread* thread, U32 len) {
42 U32 index = powerOf2(len + 4);

Callers 2

~KMemoryDataMethod · 0.45
execveMethod · 0.45

Calls 2

unmapMethod · 0.80
clearMethod · 0.45

Tested by

no test coverage detected