partition_extend_memory.c 612 B

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