summaryrefslogtreecommitdiff
path: root/runtime/mem_map.h
diff options
context:
space:
mode:
Diffstat (limited to 'runtime/mem_map.h')
-rw-r--r--runtime/mem_map.h13
1 files changed, 8 insertions, 5 deletions
diff --git a/runtime/mem_map.h b/runtime/mem_map.h
index e294824d91..919463c4c6 100644
--- a/runtime/mem_map.h
+++ b/runtime/mem_map.h
@@ -38,14 +38,16 @@ class MemMap {
// a name.
//
// On success, returns returns a MemMap instance. On failure, returns a NULL;
- static MemMap* MapAnonymous(const char* ashmem_name, byte* addr, size_t byte_count, int prot);
+ static MemMap* MapAnonymous(const char* ashmem_name, byte* addr, size_t byte_count, int prot,
+ std::string* error_msg);
// Map part of a file, taking care of non-page aligned offsets. The
// "start" offset is absolute, not relative.
//
// On success, returns returns a MemMap instance. On failure, returns a NULL;
- static MemMap* MapFile(size_t byte_count, int prot, int flags, int fd, off_t start) {
- return MapFileAtAddress(NULL, byte_count, prot, flags, fd, start, false);
+ static MemMap* MapFile(size_t byte_count, int prot, int flags, int fd, off_t start,
+ const char* filename, std::string* error_msg) {
+ return MapFileAtAddress(NULL, byte_count, prot, flags, fd, start, false, filename, error_msg);
}
// Map part of a file, taking care of non-page aligned offsets. The
@@ -53,8 +55,9 @@ class MemMap {
// requesting a specific address for the base of the mapping.
//
// On success, returns returns a MemMap instance. On failure, returns a NULL;
- static MemMap* MapFileAtAddress(
- byte* addr, size_t byte_count, int prot, int flags, int fd, off_t start, bool reuse);
+ 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);
// Releases the memory mapping
~MemMap();