Memory compaction core