Commit d2c1a732 authored by Damien's avatar Damien
Browse files

Call gc_free in gc_realloc after allocating new block.

parent 0f654513
......@@ -329,8 +329,10 @@ void *gc_realloc(void *ptr, machine_uint_t n_bytes) {
if (n_bytes <= n_existing) {
return ptr;
} else {
// TODO check if we can grow inplace
void *ptr2 = gc_alloc(n_bytes);
memcpy(ptr2, ptr, n_existing);
return ptr2;
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment