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

Unified Diff: base/allocator/generic_allocators.cc

Issue 774683003: Remove tcmalloc when not being used. Restore shim on Windows. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Remove tcmalloc from Windows build. Call new_handler on any allocation failure. Limit to 2Gb. Add … Created 5 years, 11 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
Index: base/allocator/generic_allocators.cc
diff --git a/base/allocator/generic_allocators.cc b/base/allocator/generic_allocators.cc
index d12f3b976ac274c4526cc25ad143b130f0ac0203..72c4da70da9d30b10531f69a5bc017e51af643ee 100644
--- a/base/allocator/generic_allocators.cc
+++ b/base/allocator/generic_allocators.cc
@@ -16,7 +16,7 @@ inline void* generic_cpp_alloc(size_t size, bool nothrow) {
ptr = malloc(size);
if (ptr)
return ptr;
- if (!call_new_handler(nothrow))
+ if (!call_new_handler(nothrow, size))
break;
}
return ptr;

Powered by Google App Engine
This is Rietveld 408576698