summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorchappedm@gmail.com <chappedm@gmail.com@6b5cf1ce-ec42-a296-1ba9-69fdba395a50>2012-09-18 01:27:34 +0000
committerchappedm@gmail.com <chappedm@gmail.com@6b5cf1ce-ec42-a296-1ba9-69fdba395a50>2012-09-18 01:27:34 +0000
commitb05b6fc7655ba7fee8397da7013db007f0c47e30 (patch)
tree48e600c3d627ba362ece7fde7f54c76abfc97b04
parent00edf667f62e17a268f03c6aaef19946add75dcf (diff)
downloadgperftools-b05b6fc7655ba7fee8397da7013db007f0c47e30.tar.gz
issue-458: Optimizes malloc hooks for weakly consistent memory architectures
git-svn-id: http://gperftools.googlecode.com/svn/trunk@157 6b5cf1ce-ec42-a296-1ba9-69fdba395a50
-rw-r--r--src/malloc_hook-inl.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/malloc_hook-inl.h b/src/malloc_hook-inl.h
index 27e5bdc..dd6d004 100644
--- a/src/malloc_hook-inl.h
+++ b/src/malloc_hook-inl.h
@@ -66,7 +66,7 @@ class AtomicPtr {
// This prevents MSVC 2005, at least, from complaining (it has to
// do with __wp64; AtomicWord is __wp64, but Atomic32/64 aren't).
return reinterpret_cast<PtrT>(static_cast<AtomicWord>(
- base::subtle::Acquire_Load(&data_)));
+ base::subtle::NoBarrier_Load(&data_)));
}
// Sets the contained value to new_val and returns the old value,
@@ -124,7 +124,7 @@ struct PERFTOOLS_DLL_DECL HookList {
// Fast inline implementation for fast path of Invoke*Hook.
bool empty() const {
- return base::subtle::Acquire_Load(&priv_end) == 0;
+ return base::subtle::NoBarrier_Load(&priv_end) == 0;
}
// This internal data is not private so that the class is an aggregate and can