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 longprivate longprivate final longprivate final intprivate final com.kenai.jffi.PageManagerprivate 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) longallocate(long size, int align) final voidInvoked 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.Sentinelsentinel()Methods inherited from class java.lang.ref.PhantomReference
getMethods inherited from class java.lang.ref.Reference
clear, clone, enqueue, isEnqueued, reachabilityFence, refersTo
-
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:FinalizableReferenceInvoked 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.
-