# Interface VulkanMappedMemoryType

All Superinterfaces:
  `AutoCloseable, com.io7m.jmulticlose.core.CloseableType`

All Known Subinterfaces:
  `VMAMappedMemoryType`

All Known Implementing Classes:
  `VulkanLWJGLMappedMemory`

public interface VulkanMappedMemoryType extends com.io7m.jmulticlose.core.CloseableType
A pointer to an area of mapped memory.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `ByteBuffer`
  `asByteBuffer()`
  `void`
  `close()`
  Unmap the memory.
  `void`
  `flush()`
  Flush this mapped memory.
  `void`
  `flushRange(long offset, long size)`
  Flush the given memory range.
  `boolean`
  `isMapped()`

  ### Methods inherited from interface com.io7m.jmulticlose.core.CloseableType

  `isClosed`

- ## Method Details

  - ### isMapped

    boolean isMapped()
    Returns:
      `true` iff `close()` has not been called

  - ### flushRange

    void flushRange(long offset, long size) throws VulkanException
    Flush the given memory range.
    Parameters:
      `offset` - The offset
      `size` - The size
    Throws:
      `VulkanException` - On errors
    See Also:
      - `VulkanLogicalDeviceType.flushMappedMemoryRange(VulkanMappedMemoryRange)`

  - ### flush

    void flush() throws VulkanException
    Flush this mapped memory.
    Throws:
      `VulkanException` - On errors
    See Also:
      - `VulkanLogicalDeviceType.flushMappedMemoryRange(VulkanMappedMemoryRange)`

  - ### close

    void close() throws VulkanException
    Unmap the memory.
    Specified by:
      `close` in interface `AutoCloseable`
    Throws:
      `VulkanException` - On errors

  - ### asByteBuffer

    ByteBuffer asByteBuffer()
    Returns:
      The mapped memory as a byte buffer