diff options
| author | 2018-08-24 09:02:28 +0100 | |
|---|---|---|
| committer | 2018-08-24 09:40:56 +0100 | |
| commit | f6985bd84b27b25e2c2ae1b865a4f28a0ccd578b (patch) | |
| tree | 5ec94a773e2c7e19842b1f2de02baf4343aff6c9 /libartbase/base/mem_map.h | |
| parent | 19759b28bc9dad1581c207d76227eb74fc8eebcb (diff) | |
Add an overload for MemMap::MapAnonymous().
Add an overload that does not take `reuse` or `use_ashmem`
parameters but uses default values (`reuse = false` and
`use_ashmem = true`) to simplify callers.
Test: m test-art-host-gtest
Test: testrunner.py --host --optimizing
Change-Id: Iaa44f770dee7e043c3a1d6867dfb0416dec83b25
Diffstat (limited to 'libartbase/base/mem_map.h')
| -rw-r--r-- | libartbase/base/mem_map.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/libartbase/base/mem_map.h b/libartbase/base/mem_map.h index 525fade9c1..cd7d502796 100644 --- a/libartbase/base/mem_map.h +++ b/libartbase/base/mem_map.h @@ -131,6 +131,14 @@ class MemMap { bool reuse, std::string* error_msg, bool use_ashmem = true); + static MemMap MapAnonymous(const char* name, + uint8_t* addr, + size_t byte_count, + int prot, + bool low_4gb, + std::string* error_msg) { + return MapAnonymous(name, addr, byte_count, prot, low_4gb, /* reuse */ false, error_msg); + } // Create placeholder for a region allocated by direct call to mmap. // This is useful when we do not have control over the code calling mmap, |