dmmstats.h 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. /*
  2. * Copyright 2012 Institute of Communication and Computer Systems (ICCS)
  3. *
  4. * Licensed under the Apache License, Version 2.0 (the "License");
  5. * you may not use this file except in compliance with the License.
  6. * You may obtain a copy of the License at
  7. *
  8. * http://www.apache.org/licenses/LICENSE-2.0
  9. *
  10. * Unless required by applicable law or agreed to in writing, software
  11. * distributed under the License is distributed on an "AS IS" BASIS,
  12. * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  13. * See the License for the specific language governing permissions and
  14. * limitations under the License.
  15. *
  16. */
  17. /**
  18. * @file dmmstats.h
  19. * @author Ioannis Koutras (joko@microlab.ntua.gr)
  20. * @date September 2012
  21. * @brief Statistics data structure.
  22. */
  23. #ifndef DMMSTATS_H
  24. #define DMMSTATS_H
  25. #include <stddef.h> /* for size_t */
  26. #include <inttypes.h>
  27. /** Statistics data structure. */
  28. typedef struct dmmstats_s {
  29. #ifdef REQUEST_SIZE_INFO
  30. size_t total_mem_requested; /**< Total memory actively used by the
  31. application. */
  32. #endif /* REQUEST_SIZE_INFO */
  33. size_t total_mem_allocated; /**< Total memory allocated by the
  34. application. */
  35. uint32_t live_objects; /**< Number of the currently used blocks. */
  36. uint32_t num_malloc; /**< Number of malloc()'s served. */
  37. uint32_t num_free; /**< Number of free()'s served. */
  38. uint32_t num_realloc; /**< Number of realloc()'s served. */
  39. } dmmstats_t;
  40. #endif /* DMMSTATS_H */