1
0

partition_extend_memory.c 534 B

1234567891011121314151617181920
  1. /*
  2. * partition_extend_memory.c
  3. */
  4. #include "private.h"
  5. /*-------------------------------------------------------- */
  6. bool_t lub_partition_extend_memory(lub_partition_t * this, size_t required)
  7. {
  8. bool_t result = BOOL_FALSE;
  9. void *segment = lub_partition_segment_alloc(this, &required);
  10. if (segment) {
  11. lub_partition_lock(this);
  12. lub_heap_add_segment(this->m_global_heap, segment, required);
  13. lub_partition_unlock(this);
  14. result = BOOL_TRUE;
  15. }
  16. return result;
  17. }
  18. /*-------------------------------------------------------- */