Ark Server API (ASA) - Wiki
Loading...
Searching...
No Matches
TCachedOSPageAllocator< NumCacheBlocks, CachedByteLimit > Struct Template Reference

#include <CachedOSPageAllocator.h>

+ Inheritance diagram for TCachedOSPageAllocator< NumCacheBlocks, CachedByteLimit >:
+ Collaboration diagram for TCachedOSPageAllocator< NumCacheBlocks, CachedByteLimit >:

Public Member Functions

 TCachedOSPageAllocator ()
 
FORCEINLINE voidAllocate (SIZE_T Size, uint32 AllocationHint=0, FCriticalSection *Mutex=nullptr)
 
void Free (void *Ptr, SIZE_T Size, FCriticalSection *Mutex=nullptr, bool ThreadIsTimeCritical=false)
 
void FreeAll (FCriticalSection *Mutex=nullptr)
 
void Refresh ()
 
void UpdateStats ()
 
uint64 GetCachedFreeTotal ()
 
bool IsOSAllocation (SIZE_T Size)
 

Private Attributes

FFreePageBlock FreedPageBlocks [NumCacheBlocks *2]
 
SIZE_T CachedTotal
 
uint32 FreedPageBlocksNum
 

Additional Inherited Members

- Private Member Functions inherited from FCachedOSPageAllocator
voidAllocateImpl (SIZE_T Size, uint32 CachedByteLimit, FFreePageBlock *First, FFreePageBlock *Last, uint32 &FreedPageBlocksNum, SIZE_T &CachedTotal, FCriticalSection *Mutex)
 
void FreeImpl (void *Ptr, SIZE_T Size, uint32 NumCacheBlocks, uint32 CachedByteLimit, FFreePageBlock *First, uint32 &FreedPageBlocksNum, SIZE_T &CachedTotal, FCriticalSection *Mutex, bool ThreadIsTimeCritical)
 
void FreeAllImpl (FFreePageBlock *First, uint32 &FreedPageBlocksNum, SIZE_T &CachedTotal, FCriticalSection *Mutex)
 
- Static Private Member Functions inherited from FCachedOSPageAllocator
static bool IsOSAllocation (SIZE_T Size, uint32 CachedByteLimit)
 

Detailed Description

template<uint32 NumCacheBlocks, uint32 CachedByteLimit>
struct TCachedOSPageAllocator< NumCacheBlocks, CachedByteLimit >

Definition at line 35 of file CachedOSPageAllocator.h.

Constructor & Destructor Documentation

◆ TCachedOSPageAllocator()

template<uint32 NumCacheBlocks, uint32 CachedByteLimit>
TCachedOSPageAllocator< NumCacheBlocks, CachedByteLimit >::TCachedOSPageAllocator ( )
inline

Definition at line 37 of file CachedOSPageAllocator.h.

Member Function Documentation

◆ Allocate()

template<uint32 NumCacheBlocks, uint32 CachedByteLimit>
FORCEINLINE void * TCachedOSPageAllocator< NumCacheBlocks, CachedByteLimit >::Allocate ( SIZE_T Size,
uint32 AllocationHint = 0,
FCriticalSection * Mutex = nullptr )
inline

Definition at line 43 of file CachedOSPageAllocator.h.

◆ Free()

template<uint32 NumCacheBlocks, uint32 CachedByteLimit>
void TCachedOSPageAllocator< NumCacheBlocks, CachedByteLimit >::Free ( void * Ptr,
SIZE_T Size,
FCriticalSection * Mutex = nullptr,
bool ThreadIsTimeCritical = false )
inline

Definition at line 48 of file CachedOSPageAllocator.h.

◆ FreeAll()

template<uint32 NumCacheBlocks, uint32 CachedByteLimit>
void TCachedOSPageAllocator< NumCacheBlocks, CachedByteLimit >::FreeAll ( FCriticalSection * Mutex = nullptr)
inline

Definition at line 52 of file CachedOSPageAllocator.h.

◆ GetCachedFreeTotal()

template<uint32 NumCacheBlocks, uint32 CachedByteLimit>
uint64 TCachedOSPageAllocator< NumCacheBlocks, CachedByteLimit >::GetCachedFreeTotal ( )
inline

Definition at line 65 of file CachedOSPageAllocator.h.

◆ IsOSAllocation()

template<uint32 NumCacheBlocks, uint32 CachedByteLimit>
bool TCachedOSPageAllocator< NumCacheBlocks, CachedByteLimit >::IsOSAllocation ( SIZE_T Size)
inline

Definition at line 70 of file CachedOSPageAllocator.h.

◆ Refresh()

template<uint32 NumCacheBlocks, uint32 CachedByteLimit>
void TCachedOSPageAllocator< NumCacheBlocks, CachedByteLimit >::Refresh ( )
inline

Definition at line 57 of file CachedOSPageAllocator.h.

◆ UpdateStats()

template<uint32 NumCacheBlocks, uint32 CachedByteLimit>
void TCachedOSPageAllocator< NumCacheBlocks, CachedByteLimit >::UpdateStats ( )
inline

Definition at line 61 of file CachedOSPageAllocator.h.

Member Data Documentation

◆ CachedTotal

template<uint32 NumCacheBlocks, uint32 CachedByteLimit>
SIZE_T TCachedOSPageAllocator< NumCacheBlocks, CachedByteLimit >::CachedTotal
private

Definition at line 77 of file CachedOSPageAllocator.h.

◆ FreedPageBlocks

template<uint32 NumCacheBlocks, uint32 CachedByteLimit>
FFreePageBlock TCachedOSPageAllocator< NumCacheBlocks, CachedByteLimit >::FreedPageBlocks[NumCacheBlocks *2]
private

Definition at line 76 of file CachedOSPageAllocator.h.

◆ FreedPageBlocksNum

template<uint32 NumCacheBlocks, uint32 CachedByteLimit>
uint32 TCachedOSPageAllocator< NumCacheBlocks, CachedByteLimit >::FreedPageBlocksNum
private

Definition at line 78 of file CachedOSPageAllocator.h.


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