Revert "Quick: Work around large frame sizes for x86_64."
Instead, move the MEMORY_TOOL_MAKE_* calls out-of-line.
Bug: 24729377
This reverts commit d4cf1e4fe0624b99df22ed5556dc1d042b32a7e0.
Change-Id: I9bccc8bd4a691a2d018b84de8b95bc68fafad4e1
diff --git a/runtime/base/arena_allocator.h b/runtime/base/arena_allocator.h
index 565b416..47cd8b5 100644
--- a/runtime/base/arena_allocator.h
+++ b/runtime/base/arena_allocator.h
@@ -180,20 +180,25 @@
using ArenaAllocatorMemoryToolCheck::IsRunningOnMemoryTool;
void MakeDefined(void* ptr, size_t size) {
- if (IsRunningOnMemoryTool()) {
- MEMORY_TOOL_MAKE_DEFINED(ptr, size);
+ if (UNLIKELY(IsRunningOnMemoryTool())) {
+ DoMakeDefined(ptr, size);
}
}
void MakeUndefined(void* ptr, size_t size) {
- if (IsRunningOnMemoryTool()) {
- MEMORY_TOOL_MAKE_UNDEFINED(ptr, size);
+ if (UNLIKELY(IsRunningOnMemoryTool())) {
+ DoMakeUndefined(ptr, size);
}
}
void MakeInaccessible(void* ptr, size_t size) {
- if (IsRunningOnMemoryTool()) {
- MEMORY_TOOL_MAKE_NOACCESS(ptr, size);
+ if (UNLIKELY(IsRunningOnMemoryTool())) {
+ DoMakeInaccessible(ptr, size);
}
}
+
+ private:
+ void DoMakeDefined(void* ptr, size_t size);
+ void DoMakeUndefined(void* ptr, size_t size);
+ void DoMakeInaccessible(void* ptr, size_t size);
};
class Arena {