OSDN Git Service

Fix race condition in release pages.
authorMathieu Chartier <mathieuc@google.com>
Thu, 10 Jul 2014 17:16:44 +0000 (10:16 -0700)
committerMathieu Chartier <mathieuc@google.com>
Fri, 11 Jul 2014 00:15:24 +0000 (17:15 -0700)
commite28ed99750554e0314b893dd2aa88ff9c3ca4500
tree777e6e559425a1754136d03eaa3b8196ced86b08
parent183636622546ce73c8b67e586e0bc0799fe9c905
Fix race condition in release pages.

There was a race condition where another thread could coalesce the
free page run before we acquired the lock. In that case
free_page_runs_.find will not find a run starting at fpr. Added a
condition to handle this case. Also added handling for free page
runs with begin with released pages but end with empty pages.

Bug: 16191993
Change-Id: Ib12fdac8c246eae29c36f6a6728eb11d85553bbb
runtime/gc/allocator/rosalloc.cc