amalloc.h 492 B

123456789101112131415161718192021222324252627282930
  1. /*
  2. * debugging malloc()/realloc()/calloc()/free() that attempts
  3. * to keep track of just what's been allocated today.
  4. */
  5. #ifndef AMALLOC_D
  6. #define AMALLOC_D
  7. #include "config.h"
  8. #ifdef USE_AMALLOC
  9. extern void *amalloc(int);
  10. extern void *acalloc(int,int);
  11. extern void *arealloc(void*,int);
  12. extern void afree(void*);
  13. extern void adump();
  14. #define malloc amalloc
  15. #define calloc acalloc
  16. #define realloc arealloc
  17. #define free afree
  18. #else
  19. #define adump() (void)1
  20. #endif
  21. #endif/*AMALLOC_D*/