1
0

partition_sysalloc.c 462 B

123456789101112131415161718192021
  1. /*
  2. * partition_sysalloc.c
  3. */
  4. #include <stdlib.h>
  5. #include "private.h"
  6. /*-------------------------------------------------------- */
  7. void *lub_partition_sysalloc(lub_partition_t * this, size_t required)
  8. {
  9. void *result = 0;
  10. if (required < this->m_partition_ceiling) {
  11. result = this->m_spec.sysalloc(required);
  12. if (result) {
  13. this->m_partition_ceiling -= required;
  14. }
  15. }
  16. return result;
  17. }
  18. /*-------------------------------------------------------- */