Begin migration of art::Atomic to std::atomic.
Change-Id: I4858d9cbed95e5ca560956b9dabd976cebe68333
diff --git a/runtime/gc/heap.h b/runtime/gc/heap.h
index eea2879..46d1268 100644
--- a/runtime/gc/heap.h
+++ b/runtime/gc/heap.h
@@ -373,7 +373,7 @@
// Returns the number of bytes currently allocated.
size_t GetBytesAllocated() const {
- return num_bytes_allocated_;
+ return num_bytes_allocated_.LoadSequentiallyConsistent();
}
// Returns the number of objects currently allocated.
@@ -409,7 +409,7 @@
// Implements java.lang.Runtime.freeMemory.
size_t GetFreeMemory() const {
- return GetTotalMemory() - num_bytes_allocated_;
+ return GetTotalMemory() - num_bytes_allocated_.LoadSequentiallyConsistent();
}
// get the space that corresponds to an object's address. Current implementation searches all