Ark Server API (ASA) - Wiki
|
#include <GenericGrowableAllocator.h>
Classes | |
struct | AllocationInfo |
struct | AllocFreeCounts |
Public Member Functions | |
TGenericGrowableAllocator (uint64 InitialSize, uint32 InType, uint32 InSubAllocationAlignment, FName InStatRegionName, const FName *InOwnerTypeToStatIdMap, void *InUserData) | |
virtual | ~TGenericGrowableAllocator () |
GrowableAllocationBaseType * | Malloc (uint32 Size, uint32 Alignment, int32 OwnerType) |
bool | Free (GrowableAllocationBaseType *Memory) |
void | GetAllocationInfo (uint32 &Chunks, uint64 &Used, uint64 &Free) |
bool | DoesAllocatorContainAddress (const void *Address) |
void | ShowAllocationInfo () |
void | ShowFullAllocationInfo () |
void | DumpMemoryInfo () |
Public Member Functions inherited from FGrowableMallocBase | |
FGrowableMallocBase () | |
virtual | ~FGrowableMallocBase () |
virtual uint64 | GetWasteApproximation () |
Private Member Functions | |
void | UpdateMemoryStatMaxSizes () |
ChunkAllocatorType * | CreateAllocChunk (uint64 Size) |
void | RemoveAllocChunk (ChunkAllocatorType *Chunk) |
void | OutOfMemory (uint32 Size) |
Additional Inherited Members | |
Protected Attributes inherited from FGrowableMallocBase | |
uint64 | TotalAllocated |
uint64 | TotalWaste |
uint64 | CurrentAllocs |
uint64 | TotalAllocs |
Allocator that will grow as needed with direct mapped memory for a given memory type
Definition at line 512 of file GenericGrowableAllocator.h.
|
inline |
Constructor Internally allocates address space for use only by this allocator
Type | - The templated memory type to allocate with this allocator |
StatRegion | - The region of memory this is responsible for, for updating the region max sizes |
Definition at line 523 of file GenericGrowableAllocator.h.
|
inlinevirtual |
Destructor
Definition at line 541 of file GenericGrowableAllocator.h.
|
inlineprivate |
Create a new allocation chunk to fit the requested size. All chunks are aligned to MIN_CHUNK_ALIGNMENT
Size | - size of chunk |
Definition at line 804 of file GenericGrowableAllocator.h.
|
inline |
Definition at line 716 of file GenericGrowableAllocator.h.
|
inline |
Definition at line 766 of file GenericGrowableAllocator.h.
|
inline |
Definition at line 637 of file GenericGrowableAllocator.h.
|
inline |
Definition at line 694 of file GenericGrowableAllocator.h.
|
inline |
Definition at line 563 of file GenericGrowableAllocator.h.
|
inlineprivate |
triggered during out of memory failure for this allocator
Definition at line 855 of file GenericGrowableAllocator.h.
|
inlineprivate |
Removes an existing allocated chunk. Unmaps its memory, decommits physical memory back to OS, flushes address entries associated with it, and deletes it
Chunk | - existing chunk to remove |
Definition at line 835 of file GenericGrowableAllocator.h.
|
inline |
Definition at line 733 of file GenericGrowableAllocator.h.
|
inline |
Definition at line 740 of file GenericGrowableAllocator.h.
|
inlineprivate |
Updates the memory stat max sizes when chunks are added/removed
Definition at line 795 of file GenericGrowableAllocator.h.
|
private |
list of currently allocated chunks
Definition at line 883 of file GenericGrowableAllocator.h.
|
private |
Definition at line 889 of file GenericGrowableAllocator.h.
|
private |
total currently allocated from OS
Definition at line 867 of file GenericGrowableAllocator.h.
|
private |
The type of memory this allocator allocates from the kernel
Definition at line 874 of file GenericGrowableAllocator.h.
|
private |
Definition at line 871 of file GenericGrowableAllocator.h.
|
private |
Definition at line 909 of file GenericGrowableAllocator.h.
|
private |
For stats/dumping, we use this to convert OwnerType of an allocation to a printable name
Definition at line 880 of file GenericGrowableAllocator.h.
|
private |
Definition at line 910 of file GenericGrowableAllocator.h.
|
private |
Definition at line 906 of file GenericGrowableAllocator.h.
|
private |
The stat memory region to update max size
Definition at line 877 of file GenericGrowableAllocator.h.
|
private |
Definition at line 864 of file GenericGrowableAllocator.h.
|
private |
Definition at line 908 of file GenericGrowableAllocator.h.
|
private |
Just stat tracking
Definition at line 870 of file GenericGrowableAllocator.h.
|
private |
Definition at line 886 of file GenericGrowableAllocator.h.