Ark Server API (ASA) - Wiki
Loading...
Searching...
No Matches
FVirtualAllocator Class Reference

#include <VirtualAllocator.h>

+ Collaboration diagram for FVirtualAllocator:

Classes

struct  FFreeLink
 
struct  FPerBlockSize
 
struct  FVirtualAllocatorStats
 
struct  FVirtualAllocatorStatsPerBlockSize
 

Public Member Functions

 FVirtualAllocator (void *InLowAdress, void *InHighAddress, size_t InPageSize, size_t InMaximumAlignment, bool bInBacksMalloc)
 
virtual ~FVirtualAllocator ()=default
 
uint32 GetPagesForSizeAndAlignment (size_t Size, size_t Alignment=1) const
 
voidAllocateVirtualPages (uint32 NumPages, size_t AlignmentForCheck=1)
 
void FreeVirtual (void *Ptr, uint32 NumPages)
 
void GetStats (FVirtualAllocatorStats &OutStats)
 

Protected Member Functions

virtual uint8AllocNewVM (size_t AlignedSize)
 

Protected Attributes

size_t SpaceConsumed
 

Private Member Functions

void FreeVirtualByBlock (void *Ptr, FPerBlockSize &Block, size_t AlignedSize)
 

Private Attributes

FCriticalSection CriticalSection
 
uint8LowAddress
 
uint8HighAddress
 
size_t TotalSize
 
size_t PageSize
 
size_t MaximumAlignment
 
uint8NextAlloc
 
FFreeLinkRecycledLinks
 
int64 LinkSize
 
bool bBacksMalloc
 
FPerBlockSize Blocks [64]
 

Detailed Description

Definition at line 12 of file VirtualAllocator.h.

Constructor & Destructor Documentation

◆ FVirtualAllocator()

FVirtualAllocator::FVirtualAllocator ( void * InLowAdress,
void * InHighAddress,
size_t InPageSize,
size_t InMaximumAlignment,
bool bInBacksMalloc )
inline

Definition at line 95 of file VirtualAllocator.h.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ ~FVirtualAllocator()

virtual FVirtualAllocator::~FVirtualAllocator ( )
virtualdefault

Member Function Documentation

◆ AllocateVirtualPages()

void * FVirtualAllocator::AllocateVirtualPages ( uint32 NumPages,
size_t AlignmentForCheck = 1 )
inline

Definition at line 131 of file VirtualAllocator.h.

+ Here is the call graph for this function:

◆ AllocNewVM()

virtual uint8 * FVirtualAllocator::AllocNewVM ( size_t AlignedSize)
inlineprotectedvirtual

Definition at line 84 of file VirtualAllocator.h.

+ Here is the caller graph for this function:

◆ FreeVirtual()

void FVirtualAllocator::FreeVirtual ( void * Ptr,
uint32 NumPages )
inline

Definition at line 194 of file VirtualAllocator.h.

+ Here is the call graph for this function:

◆ FreeVirtualByBlock()

void FVirtualAllocator::FreeVirtualByBlock ( void * Ptr,
FPerBlockSize & Block,
size_t AlignedSize )
inlineprivate

Definition at line 45 of file VirtualAllocator.h.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ GetPagesForSizeAndAlignment()

uint32 FVirtualAllocator::GetPagesForSizeAndAlignment ( size_t Size,
size_t Alignment = 1 ) const
inline

Definition at line 112 of file VirtualAllocator.h.

◆ GetStats()

void FVirtualAllocator::GetStats ( FVirtualAllocatorStats & OutStats)
inline

Definition at line 228 of file VirtualAllocator.h.

+ Here is the call graph for this function:

Member Data Documentation

◆ bBacksMalloc

bool FVirtualAllocator::bBacksMalloc
private

Definition at line 41 of file VirtualAllocator.h.

◆ Blocks

FPerBlockSize FVirtualAllocator::Blocks[64]
private

Definition at line 43 of file VirtualAllocator.h.

◆ CriticalSection

FCriticalSection FVirtualAllocator::CriticalSection
private

Definition at line 27 of file VirtualAllocator.h.

◆ HighAddress

uint8* FVirtualAllocator::HighAddress
private

Definition at line 30 of file VirtualAllocator.h.

◆ LinkSize

int64 FVirtualAllocator::LinkSize
private

Definition at line 39 of file VirtualAllocator.h.

◆ LowAddress

uint8* FVirtualAllocator::LowAddress
private

Definition at line 29 of file VirtualAllocator.h.

◆ MaximumAlignment

size_t FVirtualAllocator::MaximumAlignment
private

Definition at line 34 of file VirtualAllocator.h.

◆ NextAlloc

uint8* FVirtualAllocator::NextAlloc
private

Definition at line 36 of file VirtualAllocator.h.

◆ PageSize

size_t FVirtualAllocator::PageSize
private

Definition at line 33 of file VirtualAllocator.h.

◆ RecycledLinks

FFreeLink* FVirtualAllocator::RecycledLinks
private

Definition at line 38 of file VirtualAllocator.h.

◆ SpaceConsumed

size_t FVirtualAllocator::SpaceConsumed
protected

Definition at line 83 of file VirtualAllocator.h.

◆ TotalSize

size_t FVirtualAllocator::TotalSize
private

Definition at line 32 of file VirtualAllocator.h.


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