Loading src/mem/mman.h +6 −0 Original line number Diff line number Diff line Loading @@ -38,6 +38,9 @@ namespace mem { inline std::size_t size() const { return _size; } inline explicit operator bool() const { return virt() != nullptr and size() > 0; } inline bool operator==(chunk const &other) const { return _virt == other._virt and _size == other._size; } inline bool operator!=(chunk const &other) const { return _virt != other._virt or _size != other._size; } }; template <class Chunk> class mapped; Loading Loading @@ -269,6 +272,9 @@ namespace mem { /** @brief Calls @ref reset. */ inline ~mapped() { reset(); } inline bool operator==(mapped const &other) const { return _chunk == other._chunk; } inline bool operator!=(mapped const &other) const { return _chunk != other._chunk; } }; } Loading Loading
src/mem/mman.h +6 −0 Original line number Diff line number Diff line Loading @@ -38,6 +38,9 @@ namespace mem { inline std::size_t size() const { return _size; } inline explicit operator bool() const { return virt() != nullptr and size() > 0; } inline bool operator==(chunk const &other) const { return _virt == other._virt and _size == other._size; } inline bool operator!=(chunk const &other) const { return _virt != other._virt or _size != other._size; } }; template <class Chunk> class mapped; Loading Loading @@ -269,6 +272,9 @@ namespace mem { /** @brief Calls @ref reset. */ inline ~mapped() { reset(); } inline bool operator==(mapped const &other) const { return _chunk == other._chunk; } inline bool operator!=(mapped const &other) const { return _chunk != other._chunk; } }; } Loading