Loading mozglue/linker/CustomElf.cpp +3 −1 Original line number Diff line number Diff line Loading @@ -86,10 +86,12 @@ public: , mappable(mappable) { } private: friend class GenericMappedPtr<Mappable1stPagePtr>; void munmap(void *buf, size_t length) { mappable->munmap(buf, length); } private: Mappable *mappable; }; Loading mozglue/linker/Mappable.cpp +1 −1 Original line number Diff line number Diff line Loading @@ -206,7 +206,7 @@ public: #ifdef ANDROID ~_MappableBuffer() { /* Free the additional page we allocated. See _MappableBuffer::Create */ munmap(this + ((GetLength() + PAGE_SIZE) & ~(PAGE_SIZE - 1)), PAGE_SIZE); ::munmap(this + ((GetLength() + PAGE_SIZE) & ~(PAGE_SIZE - 1)), PAGE_SIZE); } #endif Loading mozglue/linker/Mappable.h +6 −0 Original line number Diff line number Diff line Loading @@ -26,10 +26,16 @@ public: virtual void *mmap(const void *addr, size_t length, int prot, int flags, off_t offset) = 0; private: virtual void munmap(void *addr, size_t length) { ::munmap(addr, length); } /* Limit use of Mappable::munmap to classes that keep track of the address * and size of the mapping. This allows to ignore ::munmap return value. */ friend class Mappable1stPagePtr; public: /** * Indicate to a Mappable instance that no further mmap is going to happen. */ Loading mozglue/linker/Utils.h +2 −0 Original line number Diff line number Diff line Loading @@ -247,6 +247,8 @@ struct MappedPtr: public GenericMappedPtr<MappedPtr> : GenericMappedPtr<MappedPtr>(buf, length) { } MappedPtr(): GenericMappedPtr<MappedPtr>() { } private: friend class GenericMappedPtr<MappedPtr>; void munmap(void *buf, size_t length) { ::munmap(buf, length); Loading Loading
mozglue/linker/CustomElf.cpp +3 −1 Original line number Diff line number Diff line Loading @@ -86,10 +86,12 @@ public: , mappable(mappable) { } private: friend class GenericMappedPtr<Mappable1stPagePtr>; void munmap(void *buf, size_t length) { mappable->munmap(buf, length); } private: Mappable *mappable; }; Loading
mozglue/linker/Mappable.cpp +1 −1 Original line number Diff line number Diff line Loading @@ -206,7 +206,7 @@ public: #ifdef ANDROID ~_MappableBuffer() { /* Free the additional page we allocated. See _MappableBuffer::Create */ munmap(this + ((GetLength() + PAGE_SIZE) & ~(PAGE_SIZE - 1)), PAGE_SIZE); ::munmap(this + ((GetLength() + PAGE_SIZE) & ~(PAGE_SIZE - 1)), PAGE_SIZE); } #endif Loading
mozglue/linker/Mappable.h +6 −0 Original line number Diff line number Diff line Loading @@ -26,10 +26,16 @@ public: virtual void *mmap(const void *addr, size_t length, int prot, int flags, off_t offset) = 0; private: virtual void munmap(void *addr, size_t length) { ::munmap(addr, length); } /* Limit use of Mappable::munmap to classes that keep track of the address * and size of the mapping. This allows to ignore ::munmap return value. */ friend class Mappable1stPagePtr; public: /** * Indicate to a Mappable instance that no further mmap is going to happen. */ Loading
mozglue/linker/Utils.h +2 −0 Original line number Diff line number Diff line Loading @@ -247,6 +247,8 @@ struct MappedPtr: public GenericMappedPtr<MappedPtr> : GenericMappedPtr<MappedPtr>(buf, length) { } MappedPtr(): GenericMappedPtr<MappedPtr>() { } private: friend class GenericMappedPtr<MappedPtr>; void munmap(void *buf, size_t length) { ::munmap(buf, length); Loading