1
0

heap_block_getnext.c 525 B

1234567891011121314151617
  1. #include "private.h"
  2. /*--------------------------------------------------------- */
  3. lub_heap_block_t *lub_heap_block_getnext(lub_heap_block_t * this)
  4. {
  5. lub_heap_block_t *result = NULL;
  6. lub_heap_tag_t *tail = lub_heap_block__get_tail(this);
  7. /* only go forward if this is not the last block in the segment */
  8. if (0 == tail->segment) {
  9. /* get a pointer to the first word in the next block */
  10. result = (lub_heap_block_t *) & tail[1];
  11. }
  12. return result;
  13. }
  14. /*--------------------------------------------------------- */