Files
exectos/xtoskrnl/mm/amd64/alloc.cc
Aiken Harris 7f6114f8e5
Some checks failed
Builds / ExectOS (amd64, debug) (push) Failing after 19s
Builds / ExectOS (i686, debug) (push) Successful in 25s
Builds / ExectOS (amd64, release) (push) Failing after 36s
Builds / ExectOS (i686, release) (push) Successful in 35s
Add skeleton for memory pool allocator
2026-01-29 20:00:09 +01:00

30 lines
941 B
C++

/**
* PROJECT: ExectOS
* COPYRIGHT: See COPYING.md in the top level directory
* FILE: xtoskrnl/mm/amd64/alloc.cc
* DESCRIPTION: Memory manager pool allocation
* DEVELOPERS: Aiken Harris <harraiken91@gmail.com>
*/
#include <xtos.hh>
XTAPI
VOID
MM::Allocator::InitializeNonPagedPool(VOID)
{
PMMMEMORY_LAYOUT MemoryLayout;
UNIMPLEMENTED;
/* Retrieve memory layout */
MemoryLayout = MM::Manager::GetMemoryLayout();
/* Map PPE and PDE for whole non-paged pool */
MM::Pte::MapPPE(MemoryLayout->NonPagedPoolStart, MemoryLayout->NonPagedExpansionPoolEnd, MM::Pte::GetValidPte());
MM::Pte::MapPDE(MemoryLayout->NonPagedPoolStart, MemoryLayout->NonPagedExpansionPoolEnd, MM::Pte::GetValidPte());
/* Map PTE only for the base of the non-paged pool */
MM::Pte::MapPTE(MemoryLayout->NonPagedPoolStart, (PCHAR)MemoryLayout->NonPagedPoolEnd - 1, MM::Pte::GetValidPte());
}