Clean up allocation accounting
Add a "RACING_DCHECK" for counter comparisons that are read with memory_order_relaxed, and thus might legitimately be inconsistent. This is a hack, but so long as it's only used for DCHECKs, it seems better than other available options. Several counters used inconsistent memory_order specifications. Generally move those to memory_order_relaxed for informational counters where the value does not affect code execution in a way that matters for correctness, and where performance might be an issue. In cases in which performance is clearly not an issue, just remove the memory_order specifications, thus no longer erroneously implying that we've actually thought about ordering. Improve comments in a few places where I found them confusing. Bug: 79921586 Test: build and boot AOSP. Change-Id: I8d0115817a9ff47708ed5e92e8c9caca7e73f899
Loading
Please sign in to comment