diff options
author | Hiroshi Yamauchi <yamauchi@google.com> | 2014-06-04 11:43:59 -0700 |
---|---|---|
committer | Hiroshi Yamauchi <yamauchi@google.com> | 2014-06-04 15:50:46 -0700 |
commit | 3eed93dd5be03e5539827bebf0f414251a12e15e (patch) | |
tree | 186fa74420e2595c9b6fba9ea8de94756af9cef5 /runtime/base/mutex.h | |
parent | bbdc5bc5fd5141711879a6c85d80ac45b7aad5d0 (diff) | |
download | art-3eed93dd5be03e5539827bebf0f414251a12e15e.zip art-3eed93dd5be03e5539827bebf0f414251a12e15e.tar.gz art-3eed93dd5be03e5539827bebf0f414251a12e15e.tar.bz2 |
Verify there's no mem map gap for immune region not to break.
This adds code that verifies that there's no memory map gap between
the image space and the main space so that the immune region
functionality won't silently break. For example, if there's a gap and
a large object is allocated in that gap, the large object is
incorrectly part of the immune region and the marking breaks.
Bug: 14059466
Change-Id: Ie6ed82988d74b6d0562ebbbaac96ee43c15b14a6
Diffstat (limited to 'runtime/base/mutex.h')
-rw-r--r-- | runtime/base/mutex.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/runtime/base/mutex.h b/runtime/base/mutex.h index 522692e..68b450a 100644 --- a/runtime/base/mutex.h +++ b/runtime/base/mutex.h @@ -54,6 +54,7 @@ class Thread; // [1] http://www.drdobbs.com/parallel/use-lock-hierarchies-to-avoid-deadlock/204801163 enum LockLevel { kLoggingLock = 0, + kMemMapsLock, kUnexpectedSignalLock, kThreadSuspendCountLock, kAbortLock, @@ -573,6 +574,9 @@ class Locks { // One unexpected signal at a time lock. static Mutex* unexpected_signal_lock_ ACQUIRED_AFTER(thread_suspend_count_lock_); + // Guards the maps in mem_map. + static Mutex* mem_maps_lock_ ACQUIRED_AFTER(unexpected_signal_lock_); + // Have an exclusive logging thread. static Mutex* logging_lock_ ACQUIRED_AFTER(unexpected_signal_lock_); }; |