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

Function KernelFree2MPages

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

Source from the content-addressed store, hash-verified

474 }
475
476 void KernelFree2MPages(void* addr, uint64_t amount){
477 while(amount--){
478 uint64_t pageDirIndex = PAGE_DIR_GET_INDEX((uint64_t)addr);
479 kernelHeapDir[pageDirIndex] = 0;
480 addr = (void*)((uint64_t)addr + 0x200000);
481 }
482 }
483
484 void Free4KPages(void* addr, uint64_t amount, address_space_t* addressSpace){
485 uint64_t pml4Index, pdptIndex, pageDirIndex, pageIndex;

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected