Remove skipped blocks reuse mechanism

We had a fairly elaborate mechanism for dealing with the case in
which two threads raced to copy an object. They would both copy,
and we would then put the copied object from the loser into
a special data structure, whose contents we could reuse for
allocation if we otherwise ran out of memory. It was tricky
to correctly account for this space.

This replaces that code with a simpler heuristic mechanism to avoid
copying the same large object twice. If we do copy an object twice, we
just drop it on the floor. I believe this better handles the one
case in which it really matters: A large object that all threads need
and thus immediately start copying after a flip.

It is hard to convince oneself that any of this matters. In my two
experiments booting and running AOSP for a little with logging,
I saw one race each time, with an average object size of 20 bytes.

Bug: 132625279
Test: Boot AOSP with logging twice.
Change-Id: Ie0e7dbd8f68c9f4e13ec418c26ff460d3977e10d
2 files changed