MemoryReporting.h 785 B

123456789101112131415161718192021222324252627282930
  1. /* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  2. /* This Source Code Form is subject to the terms of the Mozilla Public
  3. * License, v. 2.0. If a copy of the MPL was not distributed with this
  4. * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
  5. /* Memory reporting infrastructure. */
  6. #ifndef mozilla_MemoryReporting_h
  7. #define mozilla_MemoryReporting_h
  8. #include <stddef.h>
  9. #ifdef __cplusplus
  10. namespace mozilla {
  11. /*
  12. * This is for functions that are like malloc_usable_size. Such functions are
  13. * used for measuring the size of data structures.
  14. */
  15. typedef size_t (*MallocSizeOf)(const void* p);
  16. } /* namespace mozilla */
  17. #endif /* __cplusplus */
  18. typedef size_t (*MozMallocSizeOf)(const void* p);
  19. #endif /* mozilla_MemoryReporting_h */