il_alloc.h 788 B

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. #ifndef ALLOC_H
  2. #define ALLOC_H
  3. /*#if defined(_WIN32) && defined(_MEM_DEBUG)
  4. void *c_alloc(unsigned long size, unsigned long num, const char *file, unsigned long line);
  5. void *m_alloc(unsigned long size, const char *file, unsigned long line);
  6. void f_ree(void *ptr);
  7. #ifdef malloc
  8. #undef malloc
  9. #endif
  10. #ifdef calloc
  11. #undef calloc
  12. #endif
  13. #ifdef free
  14. #undef free
  15. #endif
  16. #define malloc(size) m_alloc(size, __FILE__, __LINE__)
  17. #define calloc(size, num) c_alloc(size, num, __FILE__, __LINE__)
  18. #define free(addr) f_ree(addr)
  19. #endif//defined(_WIN32) && defined(_MEM_DEBUG)*/
  20. #if defined (__ALLOC_C)
  21. #define __ALLOC_EXTERN
  22. #else
  23. #define __ALLOC_EXTERN extern
  24. #endif
  25. #include <IL/il.h>
  26. __ALLOC_EXTERN mAlloc ialloc_ptr;
  27. __ALLOC_EXTERN mFree ifree_ptr;
  28. #endif//ALLOC_H