]> de.git.xonotic.org Git - xonotic/darkplaces.git/blobdiff - zone.c
- Got rid of all the FILE* stuff in the FS code, relying on low-level
[xonotic/darkplaces.git] / zone.c
diff --git a/zone.c b/zone.c
index 03a6bfa3d0a029880641616d42abd802eb5dadc9..bba361cc1ff29f390bb9c84520615e03f5bdcb29 100644 (file)
--- a/zone.c
+++ b/zone.c
@@ -330,6 +330,19 @@ void _Mem_CheckSentinelsGlobal(const char *filename, int fileline)
 #endif
 }
 
+qboolean Mem_IsAllocated(mempool_t *pool, void *data)
+{
+       memheader_t *header;
+       memheader_t *target;
+
+    target = (memheader_t *)((qbyte *) data - sizeof(memheader_t));
+       for( header = pool->chain ; header ; header = header->next )
+               if( header == target )
+                       return true;
+       return false;
+}
+
+
 // used for temporary memory allocations around the engine, not for longterm
 // storage, if anything in this pool stays allocated during gameplay, it is
 // considered a leak
@@ -420,6 +433,12 @@ void Memory_Init (void)
        poolchain = NULL;
 }
 
+void Memory_Shutdown (void)
+{
+//     Mem_FreePool (&zonemempool);
+//     Mem_FreePool (&tempmempool);
+}
+
 void Memory_Init_Commands (void)
 {
        Cmd_AddCommand ("memstats", MemStats_f);