1
0
mirror of https://github.com/alliedmodders/hl2sdk.git synced 2025-09-19 20:16:10 +08:00

Updated IMemAlloc interface from tier0 and added note in icvar.h about freeing ICvarIteratorInternal.

This commit is contained in:
Scott Ehlert
2008-12-02 10:36:09 -06:00
parent a5680dae14
commit 02a47fc112
2 changed files with 14 additions and 0 deletions

View File

@ -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;
};

View File

@ -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;
};
//-----------------------------------------------------------------------------