diff --git a/public/icvar.h b/public/icvar.h index a68f3580..9f52aea1 100644 --- a/public/icvar.h +++ b/public/icvar.h @@ -120,6 +120,15 @@ public: virtual void QueueMaterialThreadSetValue( ConVar *, float ) = 0; virtual bool HasQueuedMaterialThreadConVarSets() const = 0; virtual int ProcessQueuedMaterialThreadConVarSets() = 0; + + // Returns a cvar iterator pointer. + // + // If memoverride is not used, use g_pMemAlloc->Free() to deallocate the memory + // used by these iterators. + // + // If memoverride is used, you can use the delete operator even though there + // is no virtual destructor. This can be done because memoverride overloads the + // delete operator so that it will call g_pMemAlloc-Free(). virtual ICvarIteratorInternal *FactoryInternalIterator() = 0; }; diff --git a/public/tier0/memalloc.h b/public/tier0/memalloc.h index b1ccbf1d..35c6365b 100644 --- a/public/tier0/memalloc.h +++ b/public/tier0/memalloc.h @@ -74,6 +74,8 @@ public: // FIXME: Make a better stats interface virtual void DumpStats() = 0; virtual void DumpStatsFileBase( char const *pchFileBase ) = 0; + + virtual size_t ComputeMemoryUsedBy( const char *pFileName ) = 0; // FIXME: Remove when we have our own allocator virtual void* CrtSetReportFile( int nRptType, void* hFile ) = 0; @@ -104,6 +106,9 @@ public: // Returns 0 if no failure, otherwise the size_t of the last requested chunk virtual size_t MemoryAllocFailed() = 0; + + virtual void CompactIncremental() = 0; + virtual void OutOfMemory( size_t ) = 0; }; //-----------------------------------------------------------------------------