MemoryAllocator implementation which fills allocated memory with a given value.
Passes actual allocation requests to another allocator (such as AnsiAllocator).
Name | Description |
---|---|
~MemoryAllocator() | Force a virtual destructor. This is not called by GeoMemory. |
Allocate(size_t, size_t, const char *, Geo::s32, const char *) | Allocate a block of memory with the given size. |
Allocate(size_t, size_t, const char *, Geo::s32, const char *) | Allocate a block of memory with the given size. |
Free(void *, bool, const char *, Geo::s32, const char *) | Free a block of memory, possibly aligned. |
Free(void *, bool, const char *, Geo::s32, const char *) | Free a block of memory, possibly aligned. |
GeoDebugAllocator(MemoryAllocator *, char) | Creates a GeoDebugAllocator using the given MemoryAllocator to do the actual allocations. |
GetTotalMemoryAllocated() | The total amount of memory we've allocated to date (not subtracting deallocations). |
GetTotalMemoryAllocated() | The total amount of memory we've allocated to date (not subtracting deallocations). |
GetTotalMemoryAllocationCalls() | The number of times we've allocated memory through GeoMemory. |
GetTotalMemoryAllocationCalls() | The number of times we've allocated memory through GeoMemory. |
GetTotalMemoryDeallocated() | The total amount of memory we've deallocated so far. |
GetTotalMemoryDeallocated() | The total amount of memory we've deallocated so far. |
GetTotalMemoryInUse() | The total amount of memory currently allocated (allocations minus deallocations) |
GetTotalMemoryInUse() | The total amount of memory currently allocated (allocations minus deallocations) |
IsTotalMemorySummarySupported() | Returns true if the memory summary functionality is supported with this allocator. |
IsTotalMemorySummarySupported() | Returns true if the memory summary functionality is supported with this allocator. |
Realloc(void *, size_t, size_t, const char *, s32, const char *) | Reallocate a block of memory, preserving as much data as will fit in the new block size. |
Realloc(void *, size_t, size_t, const char *, s32, const char *) | Reallocate a block of memory, preserving as much data as will fit in the new block size. |
SetFillValue(char) | Sets the value which all new allocations will be filled with. |
public: virtual ~MemoryAllocator()
Force a virtual destructor. This is not called by GeoMemory.
public: virtual void * Allocate
(
size_t size,
size_t align,
const char * filename,
Geo::s32 lineNumber,
const char * message
)
Allocate a block of memory with the given size.
If alignment is 0, use unaligned allocation. Otherwise, alignment must be a power of two.
public: void * Allocate
(
size_t size,
size_t align,
const char * filename,
Geo::s32 lineNumber,
const char * message
)
Allocate a block of memory with the given size.
If alignment is 0, use unaligned allocation. Otherwise, alignment must be a power of two.
public: virtual void Free
(
void * mem,
bool aligned,
const char * filename,
Geo::s32 lineNumber,
const char * message
)
Free a block of memory, possibly aligned.
public: void Free
(
void * mem,
bool aligned,
const char * filename,
Geo::s32 lineNumber,
const char * message
)
Free a block of memory, possibly aligned.
public: GeoDebugAllocator
(
MemoryAllocator * internalAllocator,
char fillValue
)
Creates a GeoDebugAllocator using the given MemoryAllocator to do the actual allocations.
public: virtual s64 GetTotalMemoryAllocated()
The total amount of memory we've allocated to date (not subtracting deallocations).
public: virtual Geo::s64 GetTotalMemoryAllocated()
The total amount of memory we've allocated to date (not subtracting deallocations).
public: virtual s64 GetTotalMemoryAllocationCalls()
The number of times we've allocated memory through GeoMemory.
public: virtual Geo::s64 GetTotalMemoryAllocationCalls()
The number of times we've allocated memory through GeoMemory.
public: virtual s64 GetTotalMemoryDeallocated()
The total amount of memory we've deallocated so far.
public: virtual Geo::s64 GetTotalMemoryDeallocated()
The total amount of memory we've deallocated so far.
public: virtual s64 GetTotalMemoryInUse()
The total amount of memory currently allocated (allocations minus deallocations)
public: virtual Geo::s64 GetTotalMemoryInUse()
The total amount of memory currently allocated (allocations minus deallocations)
public: virtual bool IsTotalMemorySummarySupported()
Returns true if the memory summary functionality is supported with this allocator.
public: virtual bool IsTotalMemorySummarySupported()
Returns true if the memory summary functionality is supported with this allocator.
public: void * Realloc
(
void * mem,
size_t size,
size_t align,
const char * filename,
s32 lineNumber,
const char * message
)
Reallocate a block of memory, preserving as much data as will fit in the new block size.
Requires the same alignment as in the original allocation.
public: virtual void * Realloc
(
void * mem,
size_t size,
size_t align,
const char * filename,
s32 lineNumber,
const char * message
)
Reallocate a block of memory, preserving as much data as will fit in the new block size.
Requires the same alignment as in the original allocation.
public: void SetFillValue
(
char fillValue
)
Sets the value which all new allocations will be filled with.