Files
ksOS/Kernel/Include/VM/PMM.h
T
2026-04-26 15:12:04 +04:00

23 lines
446 B
C

#pragma once
#include <Types.h>
enum {
kVMPageSize = 4096,
kVMBlocksPerByte = 8,
kVMMaxReservedRegions = 128,
};
typedef struct {
UInt64 base;
Size size;
} VMMemoryRegion;
typedef struct {
VMMemoryRegion totalRAM;
VMMemoryRegion reserved[kVMMaxReservedRegions];
UInt32 reservedCount;
} VMBootMemoryMap;
void PMMInitialize(VMBootMemoryMap* bootMap);
Pointer PMMAllocatePage();
void PMMFreePage(Address address);