Ark Server API (ASA) - Wiki
Loading...
Searching...
No Matches
FMallocAnsi Class Referencefinal

#include <MallocAnsi.h>

+ Inheritance diagram for FMallocAnsi:
+ Collaboration diagram for FMallocAnsi:

Public Member Functions

 FMallocAnsi ()
 
virtual voidMalloc (SIZE_T Size, uint32 Alignment) override
 
virtual voidTryMalloc (SIZE_T Size, uint32 Alignment) override
 
virtual voidRealloc (void *Ptr, SIZE_T NewSize, uint32 Alignment) override
 
virtual voidTryRealloc (void *Ptr, SIZE_T NewSize, uint32 Alignment) override
 
virtual void Free (void *Ptr) override
 
virtual bool GetAllocationSize (void *Original, SIZE_T &SizeOut) override
 
virtual bool IsInternallyThreadSafe () const override
 
virtual bool ValidateHeap () override
 
virtual const TCHAR * GetDescriptiveName () override
 
- Public Member Functions inherited from FMalloc
virtual SIZE_T QuantizeSize (SIZE_T Count, uint32 Alignment)
 
virtual void Trim (bool bTrimThreadCaches)
 
virtual void SetupTLSCachesOnCurrentThread ()
 
virtual void ClearAndDisableTLSCachesOnCurrentThread ()
 
virtual void InitializeStatsMetadata ()
 
virtual void UpdateStats ()
 
virtual void GetAllocatorStats (FGenericMemoryStats &out_Stats)
 
virtual void DumpAllocatorStats (class FOutputDevice &Ar)
 
virtual void OnMallocInitialized ()
 
virtual void OnPreFork ()
 
virtual void OnPostFork ()
 
- Public Member Functions inherited from FUseSystemMallocForNew
voidoperator new (size_t Size)
 
void operator delete (void *Ptr)
 
voidoperator new[] (size_t Size)
 
void operator delete[] (void *Ptr)
 
- Public Member Functions inherited from FExec
virtual ~FExec ()
 
virtual bool Exec (UWorld *InWorld, const TCHAR *Cmd, FOutputDevice &Ar)
 

Additional Inherited Members

- Static Public Attributes inherited from FMalloc
static TAtomic< uint64MaxSingleAlloc
 
- Protected Member Functions inherited from FExec
virtual bool Exec_Dev (UWorld *InWorld, const TCHAR *Cmd, FOutputDevice &Ar)
 
virtual bool Exec_Editor (UWorld *InWorld, const TCHAR *Cmd, FOutputDevice &Ar)
 

Detailed Description

Definition at line 16 of file MallocAnsi.h.

Constructor & Destructor Documentation

◆ FMallocAnsi()

FMallocAnsi::FMallocAnsi ( )

Constructor enabling low fragmentation heap on platforms supporting it.

Member Function Documentation

◆ Free()

virtual void FMallocAnsi::Free ( void * Original)
overridevirtual

Free

Implements FMalloc.

◆ GetAllocationSize()

virtual bool FMallocAnsi::GetAllocationSize ( void * Original,
SIZE_T & SizeOut )
overridevirtual

If possible determine the size of the memory allocated at the given address

Parameters
Original- Pointer to memory we are checking the size of
SizeOut- If possible, this value is set to the size of the passed in pointer
Returns
true if succeeded

Reimplemented from FMalloc.

◆ GetDescriptiveName()

virtual const TCHAR * FMallocAnsi::GetDescriptiveName ( )
inlineoverridevirtual

Gets descriptive name for logging purposes.

Returns
pointer to human-readable malloc name

Reimplemented from FMalloc.

Definition at line 52 of file MallocAnsi.h.

◆ IsInternallyThreadSafe()

virtual bool FMallocAnsi::IsInternallyThreadSafe ( ) const
overridevirtual

Returns if the allocator is guaranteed to be thread-safe and therefore doesn't need a unnecessary thread-safety wrapper around it.

Returns
true as we're using system allocator

Reimplemented from FMalloc.

◆ Malloc()

virtual void * FMallocAnsi::Malloc ( SIZE_T Count,
uint32 Alignment )
overridevirtual

Malloc

Implements FMalloc.

◆ Realloc()

virtual void * FMallocAnsi::Realloc ( void * Original,
SIZE_T Count,
uint32 Alignment )
overridevirtual

Realloc

Implements FMalloc.

◆ TryMalloc()

virtual void * FMallocAnsi::TryMalloc ( SIZE_T Count,
uint32 Alignment )
overridevirtual

TryMalloc - like Malloc(), but may return a nullptr result if the allocation request cannot be satisfied.

Reimplemented from FMalloc.

◆ TryRealloc()

virtual void * FMallocAnsi::TryRealloc ( void * Original,
SIZE_T Count,
uint32 Alignment )
overridevirtual

TryRealloc - like Realloc(), but may return a nullptr if the allocation request cannot be satisfied. Note that in this case the memory pointed to by Original will still be valid

Reimplemented from FMalloc.

◆ ValidateHeap()

virtual bool FMallocAnsi::ValidateHeap ( )
overridevirtual

Validates the allocator's heap

Reimplemented from FMalloc.


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