WWMEM.H (3051B)
1 // 2 // Copyright 2020 Electronic Arts Inc. 3 // 4 // TiberianDawn.DLL and RedAlert.dll and corresponding source code is free 5 // software: you can redistribute it and/or modify it under the terms of 6 // the GNU General Public License as published by the Free Software Foundation, 7 // either version 3 of the License, or (at your option) any later version. 8 9 // TiberianDawn.DLL and RedAlert.dll and corresponding source code is distributed 10 // in the hope that it will be useful, but with permitted additional restrictions 11 // under Section 7 of the GPL. See the GNU General Public License in LICENSE.TXT 12 // distributed with this program. You should have received a copy of the 13 // GNU General Public License along with permitted additional restrictions 14 // with this program. If not, see https://github.com/electronicarts/CnC_Remastered_Collection 15 16 /*************************************************************************** 17 ** C O N F I D E N T I A L --- W E S T W O O D S T U D I O S ** 18 *************************************************************************** 19 * * 20 * Project Name : Memory System * 21 * * 22 * File Name : MEM.H * 23 * * 24 * Programmer : Jeff Wilson * 25 * * 26 * Start Date : April 4, 1994 * 27 * * 28 * Last Update : September 8, 1994 [IML] * 29 * * 30 *-------------------------------------------------------------------------* 31 * Functions: * 32 * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */ 33 #ifndef WWMEM_H 34 #define WWMEM_H 35 36 #include "wwstd.h" 37 #include "new.h" 38 #include "memflag.h" 39 40 // Defines 41 //============== 42 43 44 45 46 /*=========================================================================*/ 47 /* The following prototypes are for the file: MEM.CPP */ 48 /*=========================================================================*/ 49 50 int Mem_Init(void *buffer, long size); 51 void *Mem_Alloc(void *poolptr, long lsize, unsigned long id); 52 int Mem_Free(void *poolptr, void *buffer); 53 void Mem_Reference(void *node); 54 void Mem_Lock_Block(void *node); 55 void Mem_In_Use(void *node); 56 void *Mem_Find(void *poolptr, unsigned long id); 57 unsigned long Mem_Get_ID(void *node); 58 void *Mem_Find_Oldest(void *poolptr); 59 void *Mem_Free_Oldest(void *poolptr); 60 long Mem_Pool_Size(void *poolptr); 61 long Mem_Avail(void *poolptr); 62 long Mem_Largest_Avail(void *poolptr); 63 void Mem_Cleanup(void *poolptr); 64 65 66 #endif 67