OSDN Git Service

Fix main space memory leak and add checks.
authorMathieu Chartier <mathieuc@google.com>
Fri, 25 Jul 2014 18:50:47 +0000 (11:50 -0700)
committerMathieu Chartier <mathieuc@google.com>
Fri, 25 Jul 2014 18:55:24 +0000 (11:55 -0700)
commitb2ac1ab47f84bd989fb2c94a532f5dc7d177ebe4
treec3aefe606344b60b22d8b795ef37717448d5c542
parent5d79044420e2cb03c0cd27c47f834943983aeb4b
Fix main space memory leak and add checks.

The hypothesis is that we were leaking the main space and its
bitmaps, then eventually we would run out of virtual address space,
which would cause a null bitmap (DCHECK). Finally when we tried
adding the space with a null bitmap to the heap bitmap it segfaulted.

Changed some non performance critical DCHECK -> CHECK.

Bug: 16563323

(cherry picked from commit 2796a1669ae0f3b96db8432fbd8be1b93bf335c4)

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