OSDN Git Service

Use runFinalizationWithTimeout for native allocations
authorMathieu Chartier <mathieuc@google.com>
Fri, 5 Jun 2015 20:21:05 +0000 (13:21 -0700)
committerMathieu Chartier <mathieuc@google.com>
Fri, 5 Jun 2015 23:21:47 +0000 (16:21 -0700)
commitb5de3bb65556950d5cce1dea3ea6d80adcc5051d
tree092ccd0bde09ae445b10339c149eb403e1e82901
parent38b66b6fed1adcc1da4b931a32f78c5290a97c1e
Use runFinalizationWithTimeout for native allocations

Prevents deadlocks by not waiting longer than 250ms for finalizers
to complete.

(cherry picked from commit 3b532d744034b43ed329a3198f15846d80fec3f0)

Bug: 21544853
Change-Id: I57b2f7ae8b74185922eb3c15ba0ab71a4d2348aa
runtime/base/time_utils.h
runtime/gc/heap.cc
runtime/gc/heap.h
runtime/well_known_classes.cc
runtime/well_known_classes.h
test/004-NativeAllocations/src/Main.java