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

Unified Diff: Source/wtf/DefaultAllocator.h

Issue 251163002: Deinline PartitionAlloc from DefaultAllocator to reduce code size (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@dummy
Patch Set: fix linking by properly exporting symbols Created 6 years, 8 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 | « no previous file | Source/wtf/DefaultAllocator.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/wtf/DefaultAllocator.h
diff --git a/Source/wtf/DefaultAllocator.h b/Source/wtf/DefaultAllocator.h
index 2d14e709a467ee7296911efea6be383335b4a28a..9be80e3f72da987db061199c753b5e4380ac37bd 100644
--- a/Source/wtf/DefaultAllocator.h
+++ b/Source/wtf/DefaultAllocator.h
@@ -73,12 +73,12 @@ public:
template <typename Return, typename Metadata>
static Return backingMalloc(size_t size)
{
- return reinterpret_cast<Return>(partitionAllocGeneric(Partitions::getBufferPartition(), size));
+ return reinterpret_cast<Return>(backingAllocate(size));
}
template <typename Return, typename Metadata>
static Return zeroedBackingMalloc(size_t size)
{
- void* result = partitionAllocGeneric(Partitions::getBufferPartition(), size);
+ void* result = backingAllocate(size);
memset(result, 0, size);
return reinterpret_cast<Return>(result);
}
@@ -87,10 +87,7 @@ public:
{
return reinterpret_cast<Return>(fastMalloc(size));
}
- static void backingFree(void* address)
- {
- partitionFreeGeneric(Partitions::getBufferPartition(), address);
- }
+ WTF_EXPORT static void backingFree(void* address);
static void free(void* address)
{
fastFree(address);
@@ -132,6 +129,9 @@ public:
{
return *other;
}
+
+private:
+ WTF_EXPORT static void* backingAllocate(size_t);
};
// The Windows compiler seems to be very eager to instantiate things it won't
« no previous file with comments | « no previous file | Source/wtf/DefaultAllocator.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698