WWMEM.H 3.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667
  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. // TiberianDawn.DLL and RedAlert.dll and corresponding source code is distributed
  9. // in the hope that it will be useful, but with permitted additional restrictions
  10. // under Section 7 of the GPL. See the GNU General Public License in LICENSE.TXT
  11. // distributed with this program. You should have received a copy of the
  12. // GNU General Public License along with permitted additional restrictions
  13. // with this program. If not, see https://github.com/electronicarts/CnC_Remastered_Collection
  14. /***************************************************************************
  15. ** 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 **
  16. ***************************************************************************
  17. * *
  18. * Project Name : Memory System *
  19. * *
  20. * File Name : MEM.H *
  21. * *
  22. * Programmer : Jeff Wilson *
  23. * *
  24. * Start Date : April 4, 1994 *
  25. * *
  26. * Last Update : September 8, 1994 [IML] *
  27. * *
  28. *-------------------------------------------------------------------------*
  29. * Functions: *
  30. * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
  31. #ifndef WWMEM_H
  32. #define WWMEM_H
  33. #include "wwstd.h"
  34. #include "new.h"
  35. #include "memflag.h"
  36. // Defines
  37. //==============
  38. /*=========================================================================*/
  39. /* The following prototypes are for the file: MEM.CPP */
  40. /*=========================================================================*/
  41. int Mem_Init(void *buffer, long size);
  42. void *Mem_Alloc(void *poolptr, long lsize, unsigned long id);
  43. int Mem_Free(void *poolptr, void *buffer);
  44. void Mem_Reference(void *node);
  45. void Mem_Lock_Block(void *node);
  46. void Mem_In_Use(void *node);
  47. void *Mem_Find(void *poolptr, unsigned long id);
  48. unsigned long Mem_Get_ID(void *node);
  49. void *Mem_Find_Oldest(void *poolptr);
  50. void *Mem_Free_Oldest(void *poolptr);
  51. long Mem_Pool_Size(void *poolptr);
  52. long Mem_Avail(void *poolptr);
  53. long Mem_Largest_Avail(void *poolptr);
  54. void Mem_Cleanup(void *poolptr);
  55. #endif
  56.