Class CleanerJava24Linker.Holder
java.lang.Object
io.netty.util.internal.CleanerJava24Linker.Holder
- Enclosing class:
CleanerJava24Linker
private static final class CleanerJava24Linker.Holder
extends java.lang.Object
Links malloc and free on first use rather than when
PlatformDependent is initialized,
because creating the downcall handles is a startup cost for applications that may never allocate
a direct buffer.-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final MethodHandleprivate static final MethodHandleprivate static final long -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription(package private) static voidfree(long memoryAddress) (package private) static longmalloc(long size) private static longThe value of theRTLD_DEFAULTpseudo-handle fordlsym(3)on this platform, orRTLD_DEFAULT_UNSUPPORTEDif we do not know it.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Field Details
-
RTLD_DEFAULT_UNSUPPORTED
private static final long RTLD_DEFAULT_UNSUPPORTED- See Also:
-
INVOKE_MALLOC
-
INVOKE_FREE
-
-
Constructor Details
-
Holder
private Holder()
-
-
Method Details
-
rtldDefault
private static long rtldDefault()The value of theRTLD_DEFAULTpseudo-handle fordlsym(3)on this platform, orRTLD_DEFAULT_UNSUPPORTEDif we do not know it. The value is not standardised: glibc and musl use(void*) 0, while macOS and the BSDs use(void*) -2. Windows has nodlsym. -
malloc
static long malloc(long size) -
free
static void free(long memoryAddress)
-