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

Unified Diff: base/process/memory.h

Issue 2601573002: mac: Hook up allocator shim. (Closed)
Patch Set: Clean up. Created 4 years 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.h
diff --git a/base/process/memory.h b/base/process/memory.h
index 77911cfc3501cbd6f97313f1f9db008848838423..435bbb7c153f34a2b22210c899f074db47d841b4 100644
--- a/base/process/memory.h
+++ b/base/process/memory.h
@@ -11,6 +11,11 @@
#include "base/process/process_handle.h"
#include "build/build_config.h"
+#if defined(OS_MACOSX) && !defined(OS_IOS)
+#include <mach/mach_vm.h>
+#include "third_party/apple_apsl/malloc.h"
+#endif // defined(OS_MACOSX) && !defined(OS_IOS)
+
#ifdef PVALLOC_AVAILABLE
// Build config explicitly tells us whether or not pvalloc is available.
#elif defined(LIBC_GLIBC) && !defined(USE_TCMALLOC)
@@ -48,6 +53,13 @@ const int kMaxOomScore = 1000;
BASE_EXPORT bool AdjustOOMScore(ProcessId process, int score);
#endif
+#if defined(OS_MACOSX) && !defined(OS_IOS)
+void DeprotectMallocZone(ChromeMallocZone* default_zone,
+ mach_vm_address_t* reprotection_start,
+ mach_vm_size_t* reprotection_length,
+ vm_prot_t* reprotection_value);
+#endif // defined(OS_MACOSX) && !defined(OS_IOS)
+
#if defined(OS_WIN)
namespace win {

Powered by Google App Engine
This is Rietveld 408576698