Fix native allocation watermark clamping.
The main issue causing the test to fail is that
native_footprint_gc_watermark_ becoming > growth_limit_ due to no
clamping.
Temporary runFinalization fix is calling runFinalization 2x.
Bug: 17371542
(cherry picked from commit 4c7fc5950853b0c368e2148db77ced7c4d3c303c)
Change-Id: I05b85e95560c32c33d53bc96abf87d5262007395
diff --git a/runtime/gc/heap.h b/runtime/gc/heap.h
index a230f44..9742277 100644
--- a/runtime/gc/heap.h
+++ b/runtime/gc/heap.h
@@ -212,8 +212,8 @@
void CheckPreconditionsForAllocObject(mirror::Class* c, size_t byte_count)
SHARED_LOCKS_REQUIRED(Locks::mutator_lock_);
- void RegisterNativeAllocation(JNIEnv* env, int bytes);
- void RegisterNativeFree(JNIEnv* env, int bytes);
+ void RegisterNativeAllocation(JNIEnv* env, size_t bytes);
+ void RegisterNativeFree(JNIEnv* env, size_t bytes);
// Change the allocator, updates entrypoints.
void ChangeAllocator(AllocatorType allocator)