diff options
Diffstat (limited to 'runtime/gc/heap.cc')
| -rw-r--r-- | runtime/gc/heap.cc | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/runtime/gc/heap.cc b/runtime/gc/heap.cc index 3ed138c00e..34d82845dc 100644 --- a/runtime/gc/heap.cc +++ b/runtime/gc/heap.cc @@ -21,6 +21,8 @@ #include <unwind.h> // For GC verification. #include <vector> +#include "android-base/stringprintf.h" + #include "allocation_listener.h" #include "art_field-inl.h" #include "base/allocator.h" @@ -82,6 +84,8 @@ namespace art { namespace gc { +using android::base::StringPrintf; + static constexpr size_t kCollectorTransitionStressIterations = 0; static constexpr size_t kCollectorTransitionStressWait = 10 * 1000; // Microseconds // Minimum amount of remaining bytes before a concurrent GC is triggered. @@ -3919,7 +3923,7 @@ void Heap::RegisterNativeFree(JNIEnv* env, size_t bytes) { ScopedObjectAccess soa(env); env->ThrowNew(WellKnownClasses::java_lang_RuntimeException, StringPrintf("Attempted to free %zd native bytes with only %zd native bytes " - "registered as allocated", bytes, expected_size).c_str()); + "registered as allocated", bytes, expected_size).c_str()); break; } } while (!native_bytes_allocated_.CompareExchangeWeakRelaxed(expected_size, |