2
0

WWMEM.H 2.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869
  1. /*
  2. ** Command & Conquer Red Alert(tm)
  3. ** Copyright 2025 Electronic Arts Inc.
  4. **
  5. ** This program is free software: you can redistribute it and/or modify
  6. ** it under the terms of the GNU General Public License as published by
  7. ** the Free Software Foundation, either version 3 of the License, or
  8. ** (at your option) any later version.
  9. **
  10. ** This program is distributed in the hope that it will be useful,
  11. ** but WITHOUT ANY WARRANTY; without even the implied warranty of
  12. ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  13. ** GNU General Public License for more details.
  14. **
  15. ** You should have received a copy of the GNU General Public License
  16. ** along with this program. If not, see <http://www.gnu.org/licenses/>.
  17. */
  18. /***************************************************************************
  19. ** 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 **
  20. ***************************************************************************
  21. * *
  22. * Project Name : Memory System *
  23. * *
  24. * File Name : MEM.H *
  25. * *
  26. * Programmer : Jeff Wilson *
  27. * *
  28. * Start Date : April 4, 1994 *
  29. * *
  30. * Last Update : September 8, 1994 [IML] *
  31. * *
  32. *-------------------------------------------------------------------------*
  33. * Functions: *
  34. * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
  35. #ifndef WWMEM_H
  36. #define WWMEM_H
  37. #include "wwstd.h"
  38. #include "new.h"
  39. #include "memflag.h"
  40. // Defines
  41. //==============
  42. /*=========================================================================*/
  43. /* The following prototypes are for the file: MEM.CPP */
  44. /*=========================================================================*/
  45. int Mem_Init(void *buffer, long size);
  46. void *Mem_Alloc(void *poolptr, long lsize, unsigned long id);
  47. int Mem_Free(void *poolptr, void *buffer);
  48. void Mem_Reference(void *node);
  49. void Mem_Lock_Block(void *node);
  50. void Mem_In_Use(void *node);
  51. void *Mem_Find(void *poolptr, unsigned long id);
  52. unsigned long Mem_Get_ID(void *node);
  53. void *Mem_Find_Oldest(void *poolptr);
  54. void *Mem_Free_Oldest(void *poolptr);
  55. long Mem_Pool_Size(void *poolptr);
  56. long Mem_Avail(void *poolptr);
  57. long Mem_Largest_Avail(void *poolptr);
  58. void Mem_Cleanup(void *poolptr);
  59. #endif
  60.