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

Unified Diff: base/allocator/allocator_shim.cc

Issue 55333002: Make possible to check memory allocations inside chromium (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Make possible to check memory allocations inside chromium Created 7 years, 1 month 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 | « no previous file | base/allocator/win_allocator.cc » ('j') | base/process/memory_win.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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() {
« no previous file with comments | « no previous file | base/allocator/win_allocator.cc » ('j') | base/process/memory_win.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698