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

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: fix windows build 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..cddee257591a79c3e5b68f06413f344c946ba80d 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,14 @@ void win_heap_memalign_free(void* ptr) {
}
} // extern "C"
+
+#if !defined(WIN_USE_ALLOCATOR_SHIM)
+
+namespace base {
+bool UncheckedMalloc(size_t size, void** result) {
+ *result = win_heap_malloc(size);
+ return *result;
+}
+}
+
+#endif

Powered by Google App Engine
This is Rietveld 408576698