Index: base/allocator/allocator_shim.cc |
diff --git a/base/allocator/allocator_shim.cc b/base/allocator/allocator_shim.cc |
index 1d8229117d77a27035c84a33523b230eea7a3351..65f5ffcde622a43fb2c68148e248127997d9b150 100644 |
--- a/base/allocator/allocator_shim.cc |
+++ b/base/allocator/allocator_shim.cc |
@@ -6,6 +6,7 @@ |
#include <config.h> |
#include "base/allocator/allocator_extension_thunks.h" |
+#include "base/process/memory.h" |
#include "base/profiler/alternate_timer.h" |
#include "base/sysinfo.h" |
#include "jemalloc.h" |
@@ -402,6 +403,19 @@ void _aligned_free(void* p) { |
} // extern C |
namespace base { |
+ |
+void* UncheckedMalloc(size_t size) { |
+ switch (allocator) { |
+ case JEMALLOC: |
+ return je_malloc(size); |
+ case WINHEAP: |
+ case WINLFH: |
+ return win_heap_malloc(size); |
+ case TCMALLOC: |
+ return do_malloc(size); |
+ } |
+} |
+ |
namespace allocator { |
void SetupSubprocessAllocator() { |