Team Fortress 2 Source Code as on 22/4/2020
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

38 lines
622 B

  1. /* Alloc.h -- Memory allocation functions
  2. 2009-02-07 : Igor Pavlov : Public domain */
  3. #ifndef __COMMON_ALLOC_H
  4. #define __COMMON_ALLOC_H
  5. #include <stddef.h>
  6. #ifdef __cplusplus
  7. extern "C" {
  8. #endif
  9. void *MyAlloc(size_t size);
  10. void MyFree(void *address);
  11. #ifdef _WIN32
  12. void SetLargePageSize();
  13. void *MidAlloc(size_t size);
  14. void MidFree(void *address);
  15. void *BigAlloc(size_t size);
  16. void BigFree(void *address);
  17. #else
  18. #define MidAlloc(size) MyAlloc(size)
  19. #define MidFree(address) MyFree(address)
  20. #define BigAlloc(size) MyAlloc(size)
  21. #define BigFree(address) MyFree(address)
  22. #endif
  23. #ifdef __cplusplus
  24. }
  25. #endif
  26. #endif