- All Superinterfaces:
- AutoCloseable, HostMemoryAllocator
public interface HostMemoryReservation
extends HostMemoryAllocator, AutoCloseable
Represents some amount of host memory that has been reserved. A reservation guarantees that one
or more allocations up to the reserved amount, minus padding for alignment will succeed. A
reservation typically guarantees the amount can be allocated one, meaning when a buffer
allocated from a reservation is freed it is not returned to the reservation, but to the pool of
memory the reservation originally came from. If more memory is allocated from the reservation
an OutOfMemoryError may be thrown, but it is not guaranteed to happen.
When the reservation is closed any unused reservation will be returned to the pool of memory
the reservation came from.