partition_fini.c 615 B

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