Tracking Allocator

class simul::base::TrackingAllocator : public simul::base::MemoryInterface

A pseudo allocator that tracks video memory but does not actually allocate it.

Public Functions

virtual void *AllocateTracked(size_t nbytes, size_t align, const char *fn) override

Allocate nbytes bytes of memory, aligned to align and return a pointer to them.

virtual void Deallocate(void *ptr) override

De-allocate the memory at.


address – (requires that this memory was allocated with Allocate()).

virtual void TrackVideoMemory(void *ptr, size_t nbytes, const char *fn) override

Track (but don’t allocate) nbytes bytes of memory.

virtual void UntrackVideoMemory(void *ptr) override

Free the pointer from video memory tracking.

void Shutdown()

Shut down and report any leaks.