MCPcopy Create free account
hub / github.com/LemonOSProject/LemonOS / KernelFree4KPages

Function KernelFree4KPages

Kernel/src/arch/x86_64/paging.cpp:463–474  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

461 }
462
463 void KernelFree4KPages(void* addr, uint64_t amount){
464 uint64_t pageDirIndex, pageIndex;
465 uint64_t virt = (uint64_t)addr;
466
467 while(amount--){
468 pageDirIndex = PAGE_DIR_GET_INDEX(virt);
469 pageIndex = PAGE_TABLE_GET_INDEX(virt);
470 kernelHeapDirTables[pageDirIndex][pageIndex] = 0;
471 invlpg(virt);
472 virt += PAGE_SIZE_4K;
473 }
474 }
475
476 void KernelFree2MPages(void* addr, uint64_t amount){
477 while(amount--){

Callers 2

DestroyAddressSpaceFunction · 0.85
liballoc_freeFunction · 0.85

Calls 1

invlpgFunction · 0.85

Tested by

no test coverage detected