VM: checking addresses differ before memmoving

It appears to speed up compaction a bit in cases where only a few
objects need to move.
char-rename
Björn Lindqvist 2016-10-14 13:50:47 +02:00
parent aace892527
commit 67bb9a7c71
1 changed files with 3 additions and 1 deletions

View File

@ -279,7 +279,9 @@ void free_list_allocator<Block>::compact(Iterator& iter, Fixup fixup,
if (!state.marked_p(block_addr))
return;
*finger = (Block*)(block_addr + size);
if (dest_addr != (cell)block) {
memmove((Block*)dest_addr, block, size);
}
iter(block, (Block*)dest_addr, size);
dest_addr += size;
};