Skip to content

Commit d586539

Browse files
Update free_all_kore_mem to avoid memory corruption (#1203)
Ideally, when we call this function, we want to clean everything, including all semispaces to free the memory for future usage. However, we found a bug com a few `ValidBlocks` tests from Ethereum BlockchainTests that throws an error when collecting the old generation when we had called this `free_all_kore_mem` before. This issue doesn't happen for the GeneralStateTests, that's why we didn't find it before. This modification is safe and still keeps the benefits of freeing a lot of space, as the majority of allocated memory observed in the tests are stored in the young generation. We'll go back to investigate this GC bug soon.
1 parent 5ed9d07 commit d586539

File tree

1 file changed

+0
-1
lines changed

1 file changed

+0
-1
lines changed

runtime/collect/collect.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -347,7 +347,6 @@ void free_all_kore_mem() {
347347
kore_collect(nullptr, 0, nullptr, true);
348348
kore_clear();
349349
youngspace.munmap_arena_and_reset();
350-
oldspace.munmap_arena_and_reset();
351350
alwaysgcspace.munmap_arena_and_reset();
352351
}
353352
}

0 commit comments

Comments
 (0)