mirror of
https://github.com/ashinn/chibi-scheme.git
synced 2025-05-19 05:39:18 +02:00
catch failure to grow heap
This commit is contained in:
parent
d1bb4c27a4
commit
09b564ed7b
1 changed files with 1 additions and 1 deletions
2
gc.c
2
gc.c
|
@ -542,7 +542,7 @@ int sexp_grow_heap (sexp ctx, size_t size, size_t chunk_size) {
|
|||
cur_size = h->size;
|
||||
new_size = sexp_heap_align(((cur_size > size) ? cur_size : size) * 2);
|
||||
tmp = sexp_make_heap(new_size, h->max_size, chunk_size);
|
||||
tmp->next = h->next;
|
||||
if (tmp) tmp->next = h->next;
|
||||
h->next = tmp;
|
||||
return (h->next != NULL);
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue