Package jnr.ffi.provider.jffi
Class TransientNativeMemory.Magazine
java.lang.Object
java.lang.ref.Reference<T>
java.lang.ref.PhantomReference<T>
jnr.ffi.util.ref.FinalizablePhantomReference<TransientNativeMemory.Sentinel>
jnr.ffi.provider.jffi.TransientNativeMemory.Magazine
- All Implemented Interfaces:
FinalizableReference
- Enclosing class:
- TransientNativeMemory
private static final class TransientNativeMemory.Magazine
extends FinalizablePhantomReference<TransientNativeMemory.Sentinel>
Holder for a group of memory allocations.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final long
private long
private final long
private final int
private final com.kenai.jffi.PageManager
private final Reference<TransientNativeMemory.Sentinel>
-
Constructor Summary
ConstructorsConstructorDescriptionMagazine
(TransientNativeMemory.Sentinel sentinel, com.kenai.jffi.PageManager pm, long page, int pageCount) -
Method Summary
Modifier and TypeMethodDescription(package private) long
allocate
(long size, int align) final void
Invoked on a background thread after the referent has been garbage collected unless security restrictions prevented starting a background thread, in which case this method is invoked when new references are created.(package private) TransientNativeMemory.Sentinel
sentinel()
Methods inherited from class java.lang.ref.PhantomReference
get
Methods inherited from class java.lang.ref.Reference
clear, enqueue, isEnqueued
-
Field Details
-
sentinelReference
-
pm
private final com.kenai.jffi.PageManager pm -
page
private final long page -
end
private final long end -
pageCount
private final int pageCount -
memory
private long memory
-
-
Constructor Details
-
Magazine
Magazine(TransientNativeMemory.Sentinel sentinel, com.kenai.jffi.PageManager pm, long page, int pageCount)
-
-
Method Details
-
sentinel
TransientNativeMemory.Sentinel sentinel() -
allocate
long allocate(long size, int align) -
finalizeReferent
public final void finalizeReferent()Description copied from interface:FinalizableReference
Invoked on a background thread after the referent has been garbage collected unless security restrictions prevented starting a background thread, in which case this method is invoked when new references are created.
-