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

Unified Diff: Source/platform/heap/Heap.h

Issue 720163002: Oilpan: Vector::reserveCapacity shouldn't reallocate backing storage always (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 1 month 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 | « no previous file | Source/platform/heap/Heap.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/platform/heap/Heap.h
diff --git a/Source/platform/heap/Heap.h b/Source/platform/heap/Heap.h
index 6c4781dec79f3c8180ed80eb1a2ec8bec88f4669..a25ce2fa78e4396ab915d6e3d0e927d0933ccf00 100644
--- a/Source/platform/heap/Heap.h
+++ b/Source/platform/heap/Heap.h
@@ -304,6 +304,9 @@ public:
NO_SANITIZE_ADDRESS
size_t size() const { return m_size & sizeMask; }
+ NO_SANITIZE_ADDRESS
+ void setSize(size_t size) { m_size = (size | (m_size & ~sizeMask)); }
+
#if ENABLE(GC_PROFILE_HEAP)
NO_SANITIZE_ADDRESS
size_t encodedSize() const { return m_size; }
@@ -813,6 +816,7 @@ public:
void removePageFromHeap(HeapPage<Header>*);
PLATFORM_EXPORT void promptlyFreeObject(Header*);
+ PLATFORM_EXPORT bool expandObject(Header*, size_t);
private:
void addPageToHeap(const GCInfo*);
@@ -1491,6 +1495,7 @@ public:
return reinterpret_cast<Return>(Heap::allocate<Metadata>(size));
}
PLATFORM_EXPORT static void backingFree(void* address);
+ PLATFORM_EXPORT static bool backingExpand(void*, size_t);
static void free(void* address) { }
template<typename T>
« no previous file with comments | « no previous file | Source/platform/heap/Heap.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698