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

Unified Diff: trunk/Source/wtf/FastMalloc.cpp

Issue 23903033: Revert 157524 "Get rid of fastMallocGoodSize() and replace it wi..." (Closed) Base URL: svn://svn.chromium.org/blink/
Patch Set: Created 7 years, 3 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 | « trunk/Source/wtf/FastMalloc.h ('k') | trunk/Source/wtf/QuantizedAllocation.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: trunk/Source/wtf/FastMalloc.cpp
===================================================================
--- trunk/Source/wtf/FastMalloc.cpp (revision 157524)
+++ trunk/Source/wtf/FastMalloc.cpp (working copy)
@@ -213,6 +213,15 @@
namespace WTF {
+size_t fastMallocGoodSize(size_t bytes)
+{
+#if OS(MACOSX)
+ return malloc_good_size(bytes);
+#else
+ return bytes;
+#endif
+}
+
void* fastMalloc(size_t n)
{
ASSERT(!isForbidden());
@@ -2457,6 +2466,13 @@
#define pageheap getPageHeap()
+size_t fastMallocGoodSize(size_t bytes)
+{
+ if (!phinited)
+ TCMalloc_ThreadCache::InitModule();
+ return AllocationSize(bytes);
+}
+
#if USE_BACKGROUND_THREAD_TO_SCAVENGE_MEMORY
#if HAVE(DISPATCH_H) || OS(WIN)
« no previous file with comments | « trunk/Source/wtf/FastMalloc.h ('k') | trunk/Source/wtf/QuantizedAllocation.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698