XII Release 0.1.0
Loading...
Searching...
No Matches
xiiPageAllocator Class Reference

Copyright (c) Theophilus Eriata. All Rights Reserved. More...

#include <PageAllocator.h>

Static Public Member Functions

static void * AllocatePage (size_t uiSize)
 Allocates a page-aligned memory block of at least the specified size.
static void DeallocatePage (void *pPtr)
 Deallocates a memory block previously allocated with AllocatePage.
static xiiAllocatorId GetId ()
 Returns the allocator identifier for tracking and debugging purposes.

Detailed Description

Copyright (c) Theophilus Eriata. All Rights Reserved.

Low-level memory allocator that manages whole memory pages from the operating system.

This allocator requests memory directly from the OS in page-aligned chunks, typically 4KB or larger. It's designed for scenarios where you need large, aligned memory blocks with minimal overhead. Unlike general-purpose allocators, this operates at the virtual memory level and may reserve address space that isn't immediately committed to physical memory.

Use this allocator when:

  • You need very large memory blocks (typically >64KB)
  • Memory must be page-aligned for specific algorithms or OS APIs
  • You want to minimize memory overhead for large allocations
  • You're implementing higher-level allocators that need backing storage

Member Function Documentation

◆ AllocatePage()

XII_FOUNDATION_INTERNAL_HEADER void * xiiPageAllocator::AllocatePage ( size_t uiSize)
static

Allocates a page-aligned memory block of at least the specified size.

Copyright (c) Theophilus Eriata. All Rights Reserved.

◆ GetId()

xiiAllocatorId xiiPageAllocator::GetId ( )
static

Returns the allocator identifier for tracking and debugging purposes.

Copyright (c) Theophilus Eriata. All Rights Reserved.


The documentation for this class was generated from the following files:
  • /home/runner/work/XII/XII/Source/Engine/Foundation/Memory/PageAllocator.h
  • /home/runner/work/XII/XII/Source/Engine/Foundation/Memory/Implementation/PageAllocator.cpp
  • /home/runner/work/XII/XII/Source/Engine/Foundation/Platform/Implementation/Posix/PageAllocator_posix.h
  • /home/runner/work/XII/XII/Source/Engine/Foundation/Platform/Implementation/Windows/PageAllocator_win.h