diff --git a/include/runtime/arena.h b/include/runtime/arena.h index 4bb5ac315..afbfca21b 100644 --- a/include/runtime/arena.h +++ b/include/runtime/arena.h @@ -4,6 +4,7 @@ #include #include #include +#include #include #include @@ -22,6 +23,12 @@ class arena { initialize_semispace(); } + ~arena() { + munmap(current_addr_ptr, HYPERBLOCK_SIZE); + if (collection_addr_ptr) + munmap(collection_addr_ptr, HYPERBLOCK_SIZE); + } + char *evacuate(char *scan_ptr); // Allocates the requested number of bytes as a contiguous region and returns a