OSDN Git Service
Do not initiate a concurrent collection if one is already running.
It is possible to cause a recursive garbage collection by writing a
program that triggers a concurrent garbage collection and initiates a
concurrent garbage collection before the garbage collection thread is
scheduled. For example
for (;;) { new byte[16 << 20]; System.gc(); }
When this condition occurs a warning is logged although such warnings
ought to be upgraded to fatal errors. With this change, when the
garbage collection thread is scheduled it first checks to see if there
is a running collection before calling down to start the collection.
Change-Id: Ia7baf5eba245bbf3fe053d3bad3f90876cad2459