# Interface VulkanMappedMemoryType

All Superinterfaces:
  `AutoCloseable`

All Known Subinterfaces:
  `VMAMappedMemoryType`

All Known Implementing Classes:
  `VulkanLWJGLMappedMemory`

public interface VulkanMappedMemoryType extends AutoCloseable
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()`

- ## 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