DescriptionOilpan: Simplify Heap::allocate
This CL simplifies Heap::allocate for an upcoming optimization (I'm planning to implement size-aware Heap). This CL doesn't improve performance.
- The key change is in Heap::allocate.
- After this CL, ThreadState::getStats and ThreadState::getStatsForTesting return different stats. ThreadState::getStats returns the size of allocated objects *including* object headers, whereas ThreadState::getStatsForTesting returns the size of allocated objects *excluding* object headers. This is because there is no easy way to know the header size of each object in tests, and thus tests cannot test the size of allocated objects unless ThreadState::getStatsForTesting returns the size of allocated objects *excluding* object headers.
- This CL renames Heap::getStats to Heap::getStatsForTesting because it is used by testing only.
BUG=420515
Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=184285
Patch Set 1 #
Total comments: 4
Patch Set 2 : #Patch Set 3 : #
Total comments: 3
Patch Set 4 : #
Total comments: 2
Patch Set 5 : #
Messages
Total messages: 17 (3 generated)
|