partition_show.c 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  1. /*
  2. * partition_show.c
  3. */
  4. #include <stdio.h>
  5. #include "private.h"
  6. /*-------------------------------------------------------- */
  7. void lub_partition_show(lub_partition_t * this, bool_t verbose)
  8. {
  9. lub_heap_t *local_heap = lub_partition__get_local_heap(this);
  10. lub_partition_lock(this);
  11. if (verbose) {
  12. printf("PARTITION:\n"
  13. " %p syspool usage(%" SIZE_FMT "/%" SIZE_FMT
  14. " bytes), minimum segment size(%" SIZE_FMT " bytes)\n",
  15. (void *)this,
  16. (this->m_spec.memory_limit - this->m_partition_ceiling),
  17. this->m_spec.memory_limit,
  18. this->m_spec.min_segment_size);
  19. }
  20. if (local_heap) {
  21. if (verbose) {
  22. printf
  23. ("............................................................\n");
  24. printf("LOCAL ");
  25. }
  26. lub_heap_show(local_heap, verbose);
  27. }
  28. if (this->m_global_heap) {
  29. if (verbose) {
  30. printf
  31. ("............................................................\n");
  32. printf("GLOBAL ");
  33. }
  34. lub_heap_show(this->m_global_heap, verbose);
  35. }
  36. lub_partition_unlock(this);
  37. }
  38. /*-------------------------------------------------------- */