memcheck.h 747 B

1234567891011121314151617181920212223242526272829303132333435
  1. /* Copyright (c) 2017 The Expat Maintainers
  2. * Copying is permitted under the MIT license. See the file COPYING
  3. * for details.
  4. *
  5. * memcheck.h
  6. *
  7. * Interface to allocation functions that will track what has or has
  8. * not been freed.
  9. */
  10. #ifdef __cplusplus
  11. extern "C" {
  12. #endif
  13. #ifndef XML_MEMCHECK_H
  14. #define XML_MEMCHECK_H 1
  15. /* Allocation declarations */
  16. void *tracking_malloc(size_t size);
  17. void tracking_free(void *ptr);
  18. void *tracking_realloc(void *ptr, size_t size);
  19. /* End-of-test check to see if unfreed allocations remain. Returns
  20. * TRUE (1) if there is nothing, otherwise prints a report of the
  21. * remaining allocations and returns FALSE (0).
  22. */
  23. int tracking_report(void);
  24. #endif /* XML_MEMCHECK_H */
  25. #ifdef __cplusplus
  26. }
  27. #endif