1
0

partition_show.c 1.2 KB

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