Subversion Repositories HelenOS

Rev

Rev 4643 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 4643 Rev 4671
Line 408... Line 408...
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
            (next_head->free)) {
411
            block_check(next_head);
411
            block_check(next_head);
412
            block_init(head, head->size + next_head->size, false);
412
            block_init(head, head->size + next_head->size, false);
413
            split_mark(head, ALIGN_UP(size, BASE_ALIGN));
413
            split_mark(head, real_size);
414
           
414
           
415
            ptr = ((void *) head) + sizeof(heap_block_head_t);
415
            ptr = ((void *) head) + sizeof(heap_block_head_t);
416
        } else {
416
        } else {
417
            ptr = malloc(size);
417
            ptr = malloc(size);
418
            if (ptr != NULL) {
418
            if (ptr != NULL) {