Skip to content

End of Life Ruby 3.2 has reached end of life and gets no more fixes. Switch to Ruby 4.0 →

instance method

IO::Buffer#mapped?

mapped? → true or false

If the buffer is mapped, meaning it references memory mapped by the buffer.

Mapped buffers are either anonymous, if created by ::new with the IO::Buffer::MAPPED flag or if the size was at least IO::Buffer::PAGE_SIZE, or backed by a file if created with ::map.

Mapped buffers can usually be resized, and such an operation will typically invalidate all slices, but not always.

See also #locked? #not! #locked #null? also in 4.0 · 3.4 · 3.3 · 3.1