partition_fini.c 575 B

12345678910111213141516171819202122232425
  1. /*
  2. * partition_fini.c
  3. */
  4. #include <stdlib.h>
  5. #include "private.h"
  6. /*-------------------------------------------------------- */
  7. void lub_partition_fini(lub_partition_t * this)
  8. {
  9. lub_heap_t *local_heap = lub_partition__get_local_heap(this);
  10. if (local_heap) {
  11. lub_partition_destroy_local_heap(this, local_heap);
  12. }
  13. /*
  14. * we need to have destroyed any client threads
  15. * before calling this function
  16. */
  17. lub_partition_lock(this);
  18. lub_heap_destroy(this->m_global_heap);
  19. lub_partition_unlock(this);
  20. }
  21. /*-------------------------------------------------------- */