Alloc.h 549 B

123456789101112131415161718192021222324252627282930313233
  1. /* Alloc.h -- Memory allocation functions
  2. 2008-03-13
  3. Igor Pavlov
  4. Public domain */
  5. #ifndef __COMMON_ALLOC_H
  6. #define __COMMON_ALLOC_H
  7. #include <stddef.h>
  8. void *MyAlloc(size_t size);
  9. void MyFree(void *address);
  10. #ifdef _WIN32
  11. void SetLargePageSize();
  12. void *MidAlloc(size_t size);
  13. void MidFree(void *address);
  14. void *BigAlloc(size_t size);
  15. void BigFree(void *address);
  16. #else
  17. #define MidAlloc(size) MyAlloc(size)
  18. #define MidFree(address) MyFree(address)
  19. #define BigAlloc(size) MyAlloc(size)
  20. #define BigFree(address) MyFree(address)
  21. #endif
  22. #endif