diff options
Diffstat (limited to 'runtime/gc/heap.h')
-rw-r--r-- | runtime/gc/heap.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/runtime/gc/heap.h b/runtime/gc/heap.h index e568b36..9b49373 100644 --- a/runtime/gc/heap.h +++ b/runtime/gc/heap.h @@ -408,7 +408,7 @@ class Heap { // Implements java.lang.Runtime.freeMemory. size_t GetFreeMemory() const { - return GetMaxMemory() - num_bytes_allocated_.LoadSequentiallyConsistent(); + return max_allowed_footprint_ - num_bytes_allocated_.LoadSequentiallyConsistent(); } // get the space that corresponds to an object's address. Current implementation searches all |