Chromium Code Reviews| Index: base/allocator/allocator_shim.cc |
| diff --git a/base/allocator/allocator_shim.cc b/base/allocator/allocator_shim.cc |
| index 9b3b50c4ee4ca82350ad2c3d2fd69a7064608fed..aacda3d248124109a832ea67b6cf071bc66f6a78 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" |
| @@ -380,6 +381,21 @@ void _aligned_free(void* p) { |
| } // extern C |
| namespace base { |
| + |
| +bool UncheckedMalloc(size_t size, void** result) { |
| + switch (::allocator) { |
| + case JEMALLOC: |
| + *result = je_malloc(size); |
|
Nico
2014/01/08 03:20:15
Don't these need break statements?
|
| + case WINHEAP: |
| + case WINLFH: |
| + *result = win_heap_malloc(size); |
| + case TCMALLOC: |
| + *result = do_malloc(size); |
| + } |
| + |
| + return *result; |
| +} |
| + |
| namespace allocator { |
| void SetupSubprocessAllocator() { |