diff --git a/vm/aging_space.hpp b/vm/aging_space.hpp index 54ae44f34f..1c17f71db1 100644 --- a/vm/aging_space.hpp +++ b/vm/aging_space.hpp @@ -14,6 +14,21 @@ struct aging_space : bump_allocator { starts.record_object_start_offset(obj); return obj; } + + cell next_object_after(cell scan) { + cell size = ((object*)scan)->size(); + if (scan + size < here) + return scan + size; + else + return 0; + } + + cell first_object() { + if (start != here) + return start; + else + return 0; + } }; } diff --git a/vm/bump_allocator.hpp b/vm/bump_allocator.hpp index 5e8f3544df..cd4717032d 100644 --- a/vm/bump_allocator.hpp +++ b/vm/bump_allocator.hpp @@ -22,21 +22,6 @@ template struct bump_allocator { cell free_space() { return end - here; } - cell next_object_after(cell scan) { - cell size = ((Block*)scan)->size(); - if (scan + size < here) - return scan + size; - else - return 0; - } - - cell first_object() { - if (start != here) - return start; - else - return 0; - } - void flush() { here = start; #ifdef FACTOR_DEBUG