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

Unified Diff: base/allocator/win_allocator.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
Index: base/allocator/win_allocator.cc
diff --git a/base/allocator/win_allocator.cc b/base/allocator/win_allocator.cc
index ee451f546101c008c0b081f4c880790c20027bd6..b87f4115b5e2e10f2ada109bdcfee60e7a8f3b59 100644
--- a/base/allocator/win_allocator.cc
+++ b/base/allocator/win_allocator.cc
@@ -4,6 +4,8 @@
// This is a simple allocator based on the windows heap.
+#include "base/process/memory.h"
+
extern "C" {
HANDLE win_heap;
@@ -76,3 +78,13 @@ void win_heap_memalign_free(void* ptr) {
}
} // extern "C"
+
+#if !defined(WIN_USE_ALLOCATOR_SHIM)
+
+namespace base {
+void* UncheckedMalloc(size_t size) {
+ return win_heap_malloc(size);
+}
+}
+
+#endif

Powered by Google App Engine
This is Rietveld 408576698