diff options
| author | 2014-06-04 11:43:59 -0700 | |
|---|---|---|
| committer | 2014-06-04 15:50:46 -0700 | |
| commit | 3eed93dd5be03e5539827bebf0f414251a12e15e (patch) | |
| tree | 186fa74420e2595c9b6fba9ea8de94756af9cef5 /runtime/base/mutex.cc | |
| parent | bbdc5bc5fd5141711879a6c85d80ac45b7aad5d0 (diff) | |
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.cc')
| -rw-r--r-- | runtime/base/mutex.cc | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/runtime/base/mutex.cc b/runtime/base/mutex.cc index d2b4e01ff7..11698e2746 100644 --- a/runtime/base/mutex.cc +++ b/runtime/base/mutex.cc @@ -35,6 +35,7 @@ Mutex* Locks::breakpoint_lock_ = nullptr; ReaderWriterMutex* Locks::classlinker_classes_lock_ = nullptr; ReaderWriterMutex* Locks::heap_bitmap_lock_ = nullptr; Mutex* Locks::logging_lock_ = nullptr; +Mutex* Locks::mem_maps_lock_ = nullptr; Mutex* Locks::modify_ldt_lock_ = nullptr; ReaderWriterMutex* Locks::mutator_lock_ = nullptr; Mutex* Locks::runtime_shutdown_lock_ = nullptr; @@ -900,6 +901,10 @@ void Locks::Init() { DCHECK(unexpected_signal_lock_ == nullptr); unexpected_signal_lock_ = new Mutex("unexpected signal lock", current_lock_level, true); + UPDATE_CURRENT_LOCK_LEVEL(kMemMapsLock); + DCHECK(mem_maps_lock_ == nullptr); + mem_maps_lock_ = new Mutex("mem maps lock", current_lock_level); + UPDATE_CURRENT_LOCK_LEVEL(kLoggingLock); DCHECK(logging_lock_ == nullptr); logging_lock_ = new Mutex("logging lock", current_lock_level, true); |