Index: third_party/tcmalloc/chromium/src/page_heap_allocator.h |
diff --git a/third_party/tcmalloc/chromium/src/page_heap_allocator.h b/third_party/tcmalloc/chromium/src/page_heap_allocator.h |
index eee1590323511ec0ae312c6ad256f60fe16a493e..3595b951923d87df54f705b3122b950dc0ac46f9 100644 |
--- a/third_party/tcmalloc/chromium/src/page_heap_allocator.h |
+++ b/third_party/tcmalloc/chromium/src/page_heap_allocator.h |
@@ -37,7 +37,7 @@ |
#include "common.h" // for MetaDataAlloc |
#include "free_list.h" // for FL_Push/FL_Pop |
-#include "internal_logging.h" // for ASSERT, CRASH |
+#include "internal_logging.h" // for ASSERT |
#include "system-alloc.h" // for TCMalloc_SystemAddGuard |
namespace tcmalloc { |
@@ -71,9 +71,10 @@ class PageHeapAllocator { |
// suitably aligned memory. |
free_area_ = reinterpret_cast<char*>(MetaDataAlloc(kAllocIncrement)); |
if (free_area_ == NULL) { |
- CRASH("FATAL ERROR: Out of memory trying to allocate internal " |
- "tcmalloc data (%d bytes, object-size %d)\n", |
- kAllocIncrement, static_cast<int>(sizeof(T))); |
+ Log(kCrash, __FILE__, __LINE__, |
+ "FATAL ERROR: Out of memory trying to allocate internal " |
+ "tcmalloc data (bytes, object-size)", |
+ kAllocIncrement, sizeof(T)); |
} |
// This guard page protects the metadata from being corrupted by a |
@@ -85,9 +86,10 @@ class PageHeapAllocator { |
free_area_ += guard_size; |
free_avail_ = kAllocIncrement - guard_size; |
if (free_avail_ < sizeof(T)) { |
- CRASH("FATAL ERROR: Insufficient memory to guard internal tcmalloc " |
- "data (%d bytes, object-size %d, guard-size %d)\n", |
- kAllocIncrement, static_cast<int>(sizeof(T)), guard_size); |
+ Log(kCrash, __FILE__, __LINE__, |
+ "FATAL ERROR: Insufficient memory to guard internal tcmalloc " |
+ "data (%d bytes, object-size %d, guard-size %d)\n", |
+ kAllocIncrement, static_cast<int>(sizeof(T)), guard_size); |
} |
} |
result = free_area_; |