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
Fields Modifier and Type Field Description private longendprivate longmemoryprivate longpageprivate intpageCountprivate com.kenai.jffi.PageManagerpmprivate java.lang.ref.Reference<TransientNativeMemory.Sentinel>sentinelReference
-
Constructor Summary
Constructors Constructor Description Magazine(TransientNativeMemory.Sentinel sentinel, com.kenai.jffi.PageManager pm, long page, int pageCount)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description (package private) longallocate(long size, int align)voidfinalizeReferent()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.Sentinelsentinel()
-
-
-
Field Detail
-
sentinelReference
private final java.lang.ref.Reference<TransientNativeMemory.Sentinel> 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 Detail
-
Magazine
Magazine(TransientNativeMemory.Sentinel sentinel, com.kenai.jffi.PageManager pm, long page, int pageCount)
-
-
Method Detail
-
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.
-
-