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

Function MarkMemoryRegionUsed

Kernel/src/arch/x86_64/physicalallocator.cpp:55–58  ·  view source on GitHub ↗

Marks a region in physical memory as being used

Source from the content-addressed store, hash-verified

53
54 // Marks a region in physical memory as being used
55 void MarkMemoryRegionUsed(uint64_t base, size_t size) {
56 for (uint32_t blocks = (size + (PHYSALLOC_BLOCK_SIZE - 1)) / PHYSALLOC_BLOCK_SIZE, align = base / PHYSALLOC_BLOCK_SIZE; blocks > 0; blocks--, usedPhysicalBlocks++)
57 SetBit(align++);
58 }
59
60 // Marks a region in physical memory as being free
61 void MarkMemoryRegionFree(uint64_t base, size_t size) {

Callers 1

InitCoreFunction · 0.85

Calls 1

SetBitFunction · 0.85

Tested by

no test coverage detected