1
0

private.h 1.4 KB

12345678910111213141516171819202122232425262728293031323334
  1. #include "lub/types.h"
  2. #include "lub/partition.h"
  3. #include "lub/heap.h"
  4. #include "lub/size_fmt.h"
  5. struct _lub_partition {
  6. lub_heap_t * m_global_heap;
  7. lub_partition_spec_t m_spec;
  8. bool_t m_dying;
  9. size_t m_partition_ceiling;
  10. };
  11. lub_heap_t * lub_partition__get_local_heap(lub_partition_t * instance);
  12. void
  13. lub_partition__set_local_heap(lub_partition_t * instance,
  14. lub_heap_t * local_heap);
  15. void lub_partition_lock(lub_partition_t * instance);
  16. void lub_partition_unlock(lub_partition_t * instance);
  17. lub_heap_status_t
  18. lub_partition_global_realloc(lub_partition_t * instance, char **ptr,
  19. size_t size, lub_heap_align_t alignment);
  20. void * lub_partition_segment_alloc(lub_partition_t * instance,
  21. size_t * required);
  22. void lub_partition_destroy_local_heap(lub_partition_t * instance,
  23. lub_heap_t * local_heap);
  24. void lub_partition_time_to_die(lub_partition_t * instance);
  25. bool_t
  26. lub_partition_extend_memory(lub_partition_t * instance, size_t required);
  27. void lub_partition_destroy(lub_partition_t * instance);
  28. lub_heap_t * lub_partition_findcreate_local_heap(lub_partition_t * instance);
  29. void * lub_partition_sysalloc(lub_partition_t * instance, size_t required);
  30. void
  31. lub_partition_init(lub_partition_t * instance,
  32. const lub_partition_spec_t * spec);
  33. void lub_partition_fini(lub_partition_t * instance);