Alloc.h 481 B

123456789101112131415161718192021222324252627282930
  1. /* Alloc.h */
  2. #ifndef __COMMON_ALLOC_H
  3. #define __COMMON_ALLOC_H
  4. #include <stddef.h>
  5. void *MyAlloc(size_t size);
  6. void MyFree(void *address);
  7. #ifdef _WIN32
  8. void SetLargePageSize();
  9. void *MidAlloc(size_t size);
  10. void MidFree(void *address);
  11. void *BigAlloc(size_t size);
  12. void BigFree(void *address);
  13. #else
  14. #define MidAlloc(size) MyAlloc(size)
  15. #define MidFree(address) MyFree(address)
  16. #define BigAlloc(size) MyAlloc(size)
  17. #define BigFree(address) MyFree(address)
  18. #endif
  19. #endif