Fix double accounting of skipped objects during copying

When an object is added to skipped_blocks_map_ due to thread
losing the race on installing forwarding pointer during copying,
we add the size of the object to num_bytes_allocated_. Later,
when an object is allocated out of skipped_blocks_map_,
num_bytes_allocated_ is not adjusted accordingly. So, when this
object gets allocated (or gets added to skipped_blocks_map_
again due to losing the race), num_bytes_allocated_ goes off.

(cherry picked from commit f2a69313826f793a7ebeb5ed09ba002904495fc9)

Bug: 74763563
Test: make test-art
Change-Id: I197b94b317499281e379733d53ad19794dbe772a
1 file changed