Make a couple of map checks debug only.
This cost us close to 80ms in app startup times.
The checks that a reused region was within an already
existent map has been demoted to a debug check.
A couple of other negative checks have been removed
outright because one of them was superflous and the other
wasn't guaranteed to be correct.
bug: 16828525
(cherry picked from commit bddaea2b88b0a19d9cc7a4dea772af8e829323b3)
Change-Id: Ia6f3e69692bb9cb5b4ff6f47946ea38a56d4cdb6
diff --git a/runtime/mem_map.h b/runtime/mem_map.h
index 872c63b..9bfcd96 100644
--- a/runtime/mem_map.h
+++ b/runtime/mem_map.h
@@ -77,7 +77,8 @@
// mapping. "reuse" allows us to create a view into an existing
// mapping where we do not take ownership of the memory.
//
- // On success, returns returns a MemMap instance. On failure, returns a NULL;
+ // On success, returns returns a MemMap instance. On failure, returns a
+ // nullptr;
static MemMap* MapFileAtAddress(byte* addr, size_t byte_count, int prot, int flags, int fd,
off_t start, bool reuse, const char* filename,
std::string* error_msg);