# Class VMALWJGLAllocator

java.lang.Object
com.io7m.jcoronado.lwjgl.internal.VMALWJGLAllocator

All Implemented Interfaces:
  `VulkanHandleDispatchableType`, `VulkanHandleType`, `VMAAllocatorType`, `AutoCloseable`

public final class VMALWJGLAllocator extends Object implements VMAAllocatorType

See Also:
  - "VmaAllocator"

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `VMALWJGLAllocator(VulkanLWJGLLogicalDevice inDevice, long inAllocatorAddress, VulkanLWJGLHostAllocatorProxy inHostAllocatorProxy)`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `protected final void`
  `checkNotClosed()`
  `final void`
  `close()`
  Destroy the object.
  `protected void`
  `closeActual()`
  `VMAAllocationResult<VulkanBufferType>`
  `createBuffer(VMAAllocationCreateInfo alloc_create_info, VulkanBufferCreateInfo buffer_create_info)`
  Allocate a buffer.
  `VMAAllocationResult<VulkanImageType>`
  `createImage(VMAAllocationCreateInfo alloc_create_info, VulkanImageCreateInfo image_create_info)`
  Allocate an image.
  `final boolean`
  `equals(Object o)`
  `final long`
  `handle()`
  `final int`
  `hashCode()`
  `final VulkanLWJGLHostAllocatorProxy`
  `hostAllocatorProxy()`
  `final boolean`
  `isClosed()`
  `protected org.slf4j.Logger`
  `logger()`
  `VMAMappedMemoryType`
  `mapMemory(VMAAllocationType allocation)`
  Map the memory associated with the given allocation.
  `final String`
  `toString()`

  ### Methods inherited from class java.lang.Object

  `clone, finalize, getClass, notify, notifyAll, wait, wait, wait`

  ### Methods inherited from interface com.io7m.jcoronado.api.VulkanHandleType

  `close, isClosed`

- ## Constructor Details

  - ### VMALWJGLAllocator

    public VMALWJGLAllocator(VulkanLWJGLLogicalDevice inDevice, long inAllocatorAddress, VulkanLWJGLHostAllocatorProxy inHostAllocatorProxy)
    Parameters:
      `inDevice` - The device
      `inAllocatorAddress` - The allocator
      `inHostAllocatorProxy` - The allocator proxy
    See Also:
      - "VmaAllocator"

- ## Method Details

  - ### logger

    protected org.slf4j.Logger logger()

  - ### closeActual

    protected void closeActual()

  - ### createBuffer

    public VMAAllocationResult<VulkanBufferType> createBuffer(VMAAllocationCreateInfo alloc_create_info, VulkanBufferCreateInfo buffer_create_info) throws VulkanException
    Description copied from interface: `VMAAllocatorType`
    Allocate a buffer.
    Specified by:
      `createBuffer` in interface `VMAAllocatorType`
    Parameters:
      `alloc_create_info` - The allocation creation info
      `buffer_create_info` - The buffer creation info
    Returns:
      An allocation
    Throws:
      `VulkanException` - On errors

  - ### createImage

    public VMAAllocationResult<VulkanImageType> createImage(VMAAllocationCreateInfo alloc_create_info, VulkanImageCreateInfo image_create_info) throws VulkanException
    Description copied from interface: `VMAAllocatorType`
    Allocate an image.
    Specified by:
      `createImage` in interface `VMAAllocatorType`
    Parameters:
      `alloc_create_info` - The allocation creation info
      `image_create_info` - The image creation info
    Returns:
      An allocation
    Throws:
      `VulkanException` - On errors

  - ### mapMemory

    public VMAMappedMemoryType mapMemory(VMAAllocationType allocation) throws VulkanException
    Description copied from interface: `VMAAllocatorType`
    Map the memory associated with the given allocation.
    Specified by:
      `mapMemory` in interface `VMAAllocatorType`
    Parameters:
      `allocation` - The VMA allocation
    Returns:
      The memory, mapped
    Throws:
      `VulkanException` - On errors

  - ### hostAllocatorProxy

    public final VulkanLWJGLHostAllocatorProxy hostAllocatorProxy()
    Returns:
      The underlying host allocator proxy

  - ### isClosed

    public final boolean isClosed()
    Specified by:
      `isClosed` in interface `VulkanHandleType`
    Returns:
      `true` iff the handle has been destroyed with `VulkanHandleType.close()`
    See Also:
      - `VulkanHandleType.close()`

  - ### close

    public final void close()
    Description copied from interface: `VulkanHandleType`
    Destroy the object.
    Specified by:
      `close` in interface `AutoCloseable`
    Specified by:
      `close` in interface `VulkanHandleType`

  - ### equals

    public final boolean equals(Object o)
    Overrides:
      `equals` in class `Object`

  - ### hashCode

    public final int hashCode()
    Overrides:
      `hashCode` in class `Object`

  - ### toString

    public final String toString()
    Overrides:
      `toString` in class `Object`

  - ### handle

    public final long handle()
    Returns:
      The raw handle

  - ### checkNotClosed

    protected final void checkNotClosed() throws VulkanDestroyedException
    Throws:
      `VulkanDestroyedException`