Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(339)

Unified Diff: third_party/WebKit/Source/platform/heap/HeapPage.cpp

Issue 1393863004: Oilpan: always shrink tail-allocated backing storage (reland.) (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « third_party/WebKit/Source/platform/heap/HeapPage.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/platform/heap/HeapPage.cpp
diff --git a/third_party/WebKit/Source/platform/heap/HeapPage.cpp b/third_party/WebKit/Source/platform/heap/HeapPage.cpp
index a94679f4db7bb3e4aeff837b82613f731354300c..ac605cdb41bcb1aa3c9473f5ef937c6877a1f9bf 100644
--- a/third_party/WebKit/Source/platform/heap/HeapPage.cpp
+++ b/third_party/WebKit/Source/platform/heap/HeapPage.cpp
@@ -699,7 +699,7 @@ bool NormalPageHeap::expandObject(HeapObjectHeader* header, size_t newSize)
size_t allocationSize = Heap::allocationSizeFromSize(newSize);
ASSERT(allocationSize > header->size());
size_t expandSize = allocationSize - header->size();
- if (header->payloadEnd() == m_currentAllocationPoint && expandSize <= m_remainingAllocationSize) {
+ if (isObjectAllocatedLast(header) && expandSize <= m_remainingAllocationSize) {
haraken 2015/10/09 14:21:41 isObjectAllocatedAtAllocationPoint ?
sof 2015/10/09 14:26:40 A bit long, but why not; done.
m_currentAllocationPoint += expandSize;
m_remainingAllocationSize -= expandSize;
@@ -719,7 +719,7 @@ bool NormalPageHeap::shrinkObject(HeapObjectHeader* header, size_t newSize)
size_t allocationSize = Heap::allocationSizeFromSize(newSize);
ASSERT(header->size() > allocationSize);
size_t shrinkSize = header->size() - allocationSize;
- if (header->payloadEnd() == m_currentAllocationPoint) {
+ if (isObjectAllocatedLast(header)) {
m_currentAllocationPoint -= shrinkSize;
m_remainingAllocationSize += shrinkSize;
SET_MEMORY_INACCESSIBLE(m_currentAllocationPoint, shrinkSize);
« no previous file with comments | « third_party/WebKit/Source/platform/heap/HeapPage.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698