ReXGlue SDK
Loading...
Searching...
No Matches
rex::kernel::ISystemHeap Class Referenceabstract

#include <rex/kernel/heap.h>

Inheritance diagram for rex::kernel::ISystemHeap:
[legend]

Public Member Functions

virtual u32 SystemHeapAlloc (u32 size, u32 alignment=0x20, u32 system_heap_flags=kSystemHeapDefault)=0
virtual void SystemHeapFree (u32 address, u32 *out_region_size=nullptr)=0
virtual bool IsAddressMapped (u32 address) const =0
virtual u32 AllocPhysical (u32 size, u32 page_size, u32 protect, u32 min_address, u32 max_address, u32 alignment)=0

Detailed Description

The system heap interface XAM allocates from.

Member Function Documentation

◆ AllocPhysical()

virtual u32 rex::kernel::ISystemHeap::AllocPhysical ( u32 size,
u32 page_size,
u32 protect,
u32 min_address,
u32 max_address,
u32 alignment )
pure virtual

Allocates contiguous physical memory for the title. SystemHeapFree releases it.

Parameters
sizeThe size in bytes, rounded up to the page size.
page_sizeThe page size in bytes: 4 KiB, 64 KiB or 16 MiB.
protectMemoryProtectFlag bits.
min_addressThe lowest acceptable physical address.
max_addressThe highest acceptable physical address.
alignmentThe alignment in bytes, rounded up to the page size.
Returns
The base address, or 0 when no memory is available.

Implemented in rex::kernel::GuestAddressSpace.

◆ SystemHeapAlloc()

virtual u32 rex::kernel::ISystemHeap::SystemHeapAlloc ( u32 size,
u32 alignment = 0x20,
u32 system_heap_flags = kSystemHeapDefault )
pure virtual

Allocates memory for the system.

Parameters
system_heap_flagsSystemHeapFlag bits.

Implemented in rex::kernel::GuestAddressSpace.

◆ SystemHeapFree()

virtual void rex::kernel::ISystemHeap::SystemHeapFree ( u32 address,
u32 * out_region_size = nullptr )
pure virtual

Frees memory allocated with SystemHeapAlloc.

Parameters
out_region_sizeReceives the size of the freed region.

Implemented in rex::kernel::GuestAddressSpace.


The documentation for this class was generated from the following file: