162 | if (res.type == BSR_FOUND_GOOD_BLOCK) { | |
163 | split_if_too_big(res.block, query); | |
164 | res.block->is_free = false; | |
165 | } | |
166 | return res; | |
108 | 167 | } |
109 | 168 | |
110 | 169 | |
111 | 170 | |
112 | 171 | static struct block_header* grow_heap( struct block_header* restrict last, size_t query ) { |
113 | /* ??? */ | |
172 | if (!last) return NULL; | |
173 | struct region region = alloc_region(block_after(last), query); | |
174 | if (region_is_invalid(®ion)) return NULL; | |
175 | last->next = (struct block_header*) region.addr; | |
176 | return try_merge_with_next(last) ? last : last->next; | |
Please register or sign in to reply |
@elizabeth добавил
принято
closed
Files with large changes are collapsed by default.