OSDN Git Service

Fix race with Heap::ClampGrowthLimit and GC
authorMathieu Chartier <mathieuc@google.com>
Thu, 2 Apr 2015 17:08:03 +0000 (10:08 -0700)
committerMathieu Chartier <mathieuc@google.com>
Thu, 2 Apr 2015 18:09:34 +0000 (11:09 -0700)
commitddac42329314587f6f188bacf101b3cb15175b3c
treef0774ef2055a059ba820d3dc153a8b9f3dc41900
parente4285226d1d4d7c4feee16a968540fb2e363339f
Fix race with Heap::ClampGrowthLimit and GC

Aded logic for handling the temp bitmap if the GC is running and
the live bitmap is clamped to the mark bitmap. This fixes the SIGABRT
from ClampGrowthLimit if the GC clamped the bitmaps at this point.

Also added locking of the heap_bitmap_lock_ so that added a lock so
that the temp bitmap doesn't change from underneath us.

Bug: 20043461

Change-Id: Ib427e40bcdf149de0408b4b53e6524f51463f0af
runtime/gc/heap.cc
runtime/gc/heap.h
runtime/gc/space/malloc_space.cc