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

Unified Diff: base/process/memory_win.cc

Issue 55333002: Make possible to check memory allocations inside chromium (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 7 years, 2 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/process/memory_win.cc
diff --git a/base/process/memory_win.cc b/base/process/memory_win.cc
index c53a1be539555f41ed004f194558ad9e3f7a1a99..efac860a9f96edba59433c9f9c2fc9bf054e2bd1 100644
--- a/base/process/memory_win.cc
+++ b/base/process/memory_win.cc
@@ -82,4 +82,16 @@ HMODULE GetModuleFromAddress(void* address) {
return instance;
}
+#if defined(WIN_USE_ALLOCATOR_SHIM)
+void allocator_shim_try_malloc(size_t) __THROW;
+#endif
+
+void* UncheckedMalloc(size_t size) {
+#if defined(WIN_USE_ALLOCATOR_SHIM)
+ return allocator_shim_try_malloc(size);
+#else
+ return malloc(size);
+#endif
+}
+
} // namespace base

Powered by Google App Engine
This is Rietveld 408576698