diff options
Diffstat (limited to 'runtime/mem_map.h')
-rw-r--r-- | runtime/mem_map.h | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/runtime/mem_map.h b/runtime/mem_map.h index e49ed48..314bf8d 100644 --- a/runtime/mem_map.h +++ b/runtime/mem_map.h @@ -60,7 +60,7 @@ 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, uint8_t* addr, size_t byte_count, int prot, bool low_4gb, std::string* error_msg); // Map part of a file, taking care of non-page aligned offsets. The @@ -80,7 +80,7 @@ class MemMap { // // 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, + static MemMap* MapFileAtAddress(uint8_t* addr, size_t byte_count, int prot, int flags, int fd, off_t start, bool reuse, const char* filename, std::string* error_msg); @@ -99,7 +99,7 @@ class MemMap { return prot_; } - byte* Begin() const { + uint8_t* Begin() const { return begin_; } @@ -107,7 +107,7 @@ class MemMap { return size_; } - byte* End() const { + uint8_t* End() const { return Begin() + Size(); } @@ -120,7 +120,7 @@ class MemMap { } void* BaseEnd() const { - return reinterpret_cast<byte*>(BaseBegin()) + BaseSize(); + return reinterpret_cast<uint8_t*>(BaseBegin()) + BaseSize(); } bool HasAddress(const void* addr) const { @@ -128,7 +128,7 @@ class MemMap { } // Unmap the pages at end and remap them to create another memory map. - MemMap* RemapAtEnd(byte* new_end, const char* tail_name, int tail_prot, + MemMap* RemapAtEnd(uint8_t* new_end, const char* tail_name, int tail_prot, std::string* error_msg); static bool CheckNoGaps(MemMap* begin_map, MemMap* end_map) @@ -139,7 +139,7 @@ class MemMap { typedef AllocationTrackingMultiMap<void*, MemMap*, kAllocatorTagMaps> Maps; private: - MemMap(const std::string& name, byte* begin, size_t size, void* base_begin, size_t base_size, + MemMap(const std::string& name, uint8_t* begin, size_t size, void* base_begin, size_t base_size, int prot, bool reuse) LOCKS_EXCLUDED(Locks::mem_maps_lock_); static void DumpMapsLocked(std::ostream& os) @@ -150,7 +150,7 @@ class MemMap { EXCLUSIVE_LOCKS_REQUIRED(Locks::mem_maps_lock_); const std::string name_; - byte* const begin_; // Start of data. + uint8_t* const begin_; // Start of data. size_t size_; // Length of data. void* const base_begin_; // Page-aligned base address. |