Rev 4642 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 4642 | Rev 4643 | ||
---|---|---|---|
Line 403... | Line 403... | ||
403 | /* Look at the next block. If it is free and the size is |
403 | /* Look at the next block. If it is free and the size is |
404 | sufficient then merge the two. */ |
404 | sufficient then merge the two. */ |
405 | heap_block_head_t *next_head = |
405 | heap_block_head_t *next_head = |
406 | (heap_block_head_t *) (((void *) head) + head->size); |
406 | (heap_block_head_t *) (((void *) head) + head->size); |
407 | 407 | ||
408 | if (((void *) next_head < heap_end) |
408 | if (((void *) next_head < heap_end) && |
409 | && (head->size + next_head->size >= real_size)) { |
409 | (head->size + next_head->size >= real_size) && |
- | 410 | (next_head->free)) { |
|
410 | block_check(next_head); |
411 | block_check(next_head); |
411 | block_init(head, head->size + next_head->size, false); |
412 | block_init(head, head->size + next_head->size, false); |
412 | split_mark(head, ALIGN_UP(size, BASE_ALIGN)); |
413 | split_mark(head, ALIGN_UP(size, BASE_ALIGN)); |
413 | 414 | ||
414 | ptr = ((void *) head) + sizeof(heap_block_head_t); |
415 | ptr = ((void *) head) + sizeof(heap_block_head_t); |