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

Unified Diff: base/allocator/allocator_interception_mac.h

Issue 2649973003: Move logic from memory_mac to allocator_interception_mac. (Closed)
Patch Set: Comments from primiano. Created 3 years, 11 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
« no previous file with comments | « base/BUILD.gn ('k') | base/allocator/allocator_interception_mac.mm » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/allocator/allocator_interception_mac.h
diff --git a/base/allocator/allocator_interception_mac.h b/base/allocator/allocator_interception_mac.h
new file mode 100644
index 0000000000000000000000000000000000000000..6be5210947e1f6c8e51b9654040fe03d48c0a2a7
--- /dev/null
+++ b/base/allocator/allocator_interception_mac.h
@@ -0,0 +1,23 @@
+// Copyright 2017 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef BASE_ALLOCATOR_ALLOCATOR_INTERCEPTION_MAC_H_
+#define BASE_ALLOCATOR_ALLOCATOR_INTERCEPTION_MAC_H_
+
+#include <stddef.h>
+
+namespace base {
+namespace allocator {
+
+// Calls the original implementation of malloc/calloc prior to interception.
+bool UncheckedMallocMac(size_t size, void** result);
+bool UncheckedCallocMac(size_t num_items, size_t size, void** result);
+
+// Intercepts calls to default and purgeable malloc zones. Intercepts Core
+// Foundation and Objective-C allocations.
+void InterceptAllocationsMac();
+} // namespace allocator
+} // namespace base
+
+#endif // BASE_ALLOCATOR_ALLOCATOR_INTERCEPTION_MAC_H_
« no previous file with comments | « base/BUILD.gn ('k') | base/allocator/allocator_interception_mac.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698