io.netty.util.internal.PlatformDependent.class Maven / Gradle / Ivy
???? 2? (io/netty/util/internal/PlatformDependent java/lang/Object PlatformDependent.java Bio/netty/util/internal/PlatformDependent$ThreadLocalRandomProvider ThreadLocalRandomProvider :io/netty/util/internal/PlatformDependent$AtomicLongCounter AtomicLongCounter -io/netty/util/internal/PlatformDependent$Mpsc Mpsc *io/netty/util/internal/PlatformDependent$3 *io/netty/util/internal/PlatformDependent$2 *io/netty/util/internal/PlatformDependent$1 logger /Lio/netty/util/internal/logging/InternalLogger; "MAX_DIRECT_MEMORY_SIZE_ARG_PATTERN Ljava/util/regex/Pattern;
IS_WINDOWS Z MAYBE_SUPER_USER !CAN_ENABLE_TCP_NODELAY_BY_DEFAULT
HAS_UNSAFE DIRECT_BUFFER_PREFERRED MAX_DIRECT_MEMORY J MPSC_CHUNK_SIZE I MIN_MAX_MPSC_CAPACITY DEFAULT_MAX_MPSC_CAPACITY MAX_ALLOWED_MPSC_CAPACITY@ BYTE_ARRAY_BASE_OFFSET TMPDIR Ljava/io/File; BIT_MODE ADDRESS_SIZE USE_DIRECT_BUFFER_NO_CLEANER DIRECT_MEMORY_COUNTER (Ljava/util/concurrent/atomic/AtomicLong; DIRECT_MEMORY_LIMIT RANDOM_PROVIDER DLio/netty/util/internal/PlatformDependent$ThreadLocalRandomProvider; CLEANER Lio/netty/util/internal/Cleaner; (UNINITIALIZED_ARRAY_ALLOCATION_THRESHOLD BIG_ENDIAN_NATIVE_ORDER NOOP $assertionsDisabled allocateUninitializedArray (I)[B 7 " = )io/netty/util/internal/PlatformDependent0 ? ; <
@ A [B C size isAndroid ()Z F G
@ H isWindows K maybeSuperUser N javaVersion ()I P Q
@ R canEnableTcpNoDelayByDefault U hasUnsafe X isUnaligned Z G
@ [ directBufferPreferred ^ maxDirectMemory ()J b tmpdir ()Ljava/io/File; + , f bitMode - " i addressSize . " l allocateMemory (J)J n o
@ p
freeMemory (J)V r s
@ t address reallocateMemory (JJ)J w x
@ y newSize throwException (Ljava/lang/Throwable;)V W G
~ | }
@ ? throwException0 ? }
? t Ljava/lang/Throwable; java/lang/Throwable ? newConcurrentHashMap &()Ljava/util/concurrent/ConcurrentMap; &java/util/concurrent/ConcurrentHashMap ? ()V ? ?
? ? newLongCounter &()Lio/netty/util/internal/LongCounter;
R 'io/netty/util/internal/LongAdderCounter ?
? ? /(Lio/netty/util/internal/PlatformDependent$1;)V ? ?
? '(I)Ljava/util/concurrent/ConcurrentMap; (I)V ? ?
? ? initialCapacity ((IF)Ljava/util/concurrent/ConcurrentMap; (IF)V ? ?
? ?
loadFactor F )(IFI)Ljava/util/concurrent/ConcurrentMap; (IFI)V ? ?
? ? concurrencyLevel 5(Ljava/util/Map;)Ljava/util/concurrent/ConcurrentMap; (Ljava/util/Map;)V ? ?
? ? map Ljava/util/Map<+TK;+TV;>; Ljava/util/Map; freeDirectBuffer (Ljava/nio/ByteBuffer;)V 5 6 ? io/netty/util/internal/Cleaner ? ? ? ? ? buffer Ljava/nio/ByteBuffer; directBufferAddress (Ljava/nio/ByteBuffer;)J ? ?
@ ? directBuffer (JI)Ljava/nio/ByteBuffer; #hasDirectBufferNoCleanerConstructor ? G
@ ? newDirectBuffer ? ?
@ ? 'java/lang/UnsupportedOperationException ? Lsun.misc.Unsafe or java.nio.DirectByteBuffer.(long, int) not available ? (Ljava/lang/String;)V ? ?
? ?
memoryAddress getInt (Ljava/lang/Object;J)I ? ?
@ ? object Ljava/lang/Object; fieldOffset getByte (J)B ? ?
@ ? getShort (J)S ? ?
@ ? (J)I ? ?
@ ? getLong ? o
@ ? ([BI)B ? ?
@ ? data index ([BI)S ? ?
@ ? ([BI)I ? ?
@ ? ([BI)J ? ?
@ ? getLongSafe 8 ? ? bytes offset
getIntSafe getShortSafe hashCodeAsciiCompute (Ljava/lang/CharSequence;II)I?5? hashCodeAsciiSanitizeInt (Ljava/lang/CharSequence;I)I ? ?
value Ljava/lang/CharSequence; hash java/lang/CharSequence charAt (I)C hashCodeAsciiSanitizeShort hashCodeAsciiSanitizeByte (C)I C putByte (JB)V
@ B putShort (JS)V
@ S putInt (JI)V
@ putLong (JJ)V
@ ([BIB)V!
@" ([BIS)V$
@% ([BII)V'
@( ([BIJ)V*
@+
copyMemory (JJJ)V-.
@/ srcAddr dstAddr length ([BIJJ)V * 5 *(Ljava/lang/Object;JLjava/lang/Object;JJ)V-7
@8 src srcIndex (J[BIJ)V dst dstIndex setMemory ([BIJB)V (Ljava/lang/Object;JJB)V?A
@B (JJB)V?D
@E allocateDirectNoCleaner (I)Ljava/nio/ByteBuffer; : I / K java/lang/AssertionErrorM
N ? incrementMemoryCounterP ?
QGH
@S decrementMemoryCounterU ?
V
? e capacity reallocateDirectNoCleaner -(Ljava/nio/ByteBuffer;I)Ljava/nio/ByteBuffer; java/nio/ByteBuffer]Z Q
^_[\
@a len freeDirectNoCleaner 0 1 e &java/util/concurrent/atomic/AtomicLongg geti a
hj 2 l -io/netty/util/internal/OutOfDirectMemoryErrorn java/lang/StringBuilderp
q ? failed to allocate s append -(Ljava/lang/String;)Ljava/lang/StringBuilder;uv
qw (I)Ljava/lang/StringBuilder;uy
qz ! byte(s) of direct memory (used: | (J)Ljava/lang/StringBuilder;u~
q , max: ? (C)Ljava/lang/StringBuilder;u?
q? toString ()Ljava/lang/String;??
q?
o ?
compareAndSet (JJ)Z??
h?
usedMemory
newUsedMemory addAndGet? o
h? useDirectBufferNoCleaner equals
([BI[BII)Z unalignedAccess? G
@?
equalsSafe??
???
@? bytes1 startPos1 bytes2 startPos2 isZero ([BII)Z
isZeroSafe??
???
@? startPos equalsConstantTime
([BI[BII)I (io/netty/util/internal/ConstantTimeUtils???
??
@?
hashCodeAscii ([BII)I hashCodeAsciiSafe??
???
@? (Ljava/lang/CharSequence;)I²?53 Q? ? ?
?
? ?
? i remainingBytes newMpscQueue ()Ljava/util/Queue; (I)Ljava/util/Queue;??
?
? maxCapacity newSpscQueue @io/netty/util/internal/shaded/org/jctools/queues/SpscLinkedQueue?
? ? Mio/netty/util/internal/shaded/org/jctools/queues/atomic/SpscLinkedAtomicQueue?
? ? java/util/AbstractQueue? newFixedMpscQueue ?io/netty/util/internal/shaded/org/jctools/queues/MpscArrayQueue?
? ? Lio/netty/util/internal/shaded/org/jctools/queues/atomic/MpscAtomicArrayQueue?
? ? getClassLoader *(Ljava/lang/Class;)Ljava/lang/ClassLoader;??
@? clazz Ljava/lang/Class<*>; Ljava/lang/Class; getContextClassLoader ()Ljava/lang/ClassLoader;??
@? getSystemClassLoader??
@? newConcurrentDeque ()Ljava/util/Deque; (java/util/concurrent/LinkedBlockingDeque?
? ? *java/util/concurrent/ConcurrentLinkedDeque?
? ? threadLocalRandom ()Ljava/util/Random; 3 4 ? current?? ?
isWindows0 os.name? ? )io/netty/util/internal/SystemPropertyUtil? 8(Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String;i
? java/util/Locale US Ljava/util/Locale; java/lang/String toLowerCase &(Ljava/util/Locale;)Ljava/lang/String;
win contains (Ljava/lang/CharSequence;)Z
Platform: Windows -io/netty/util/internal/logging/InternalLogger debug ? windows maybeSuperUser0 user.name &(Ljava/lang/String;)Ljava/lang/String;i"
?# J G
%
Administrator' (Ljava/lang/Object;)Z?)
* root, toor. username Ljava/lang/String;
hasUnsafe0
H &sun.misc.Unsafe: unavailable (Android)4 isExplicitNoUnsafe6 G
@7
@ ~ sun.misc.Unsafe: {}: available< unavailable> '(Ljava/lang/String;Ljava/lang/Object;)V@A ignored maxDirectMemory0
? sun.misc.VMF java/lang/ClassH forName =(Ljava/lang/String;ZLjava/lang/ClassLoader;)Ljava/lang/Class;JK
IL ` getDeclaredMethod @(Ljava/lang/String;[Ljava/lang/Class;)Ljava/lang/reflect/Method;OP
IQ java/lang/reflect/MethodS invoke 9(Ljava/lang/Object;[Ljava/lang/Object;)Ljava/lang/Object;UV
TW java/lang/NumberY longValue[ a
Z\ java/lang/ClassLoader^ &java.lang.management.ManagementFactory` "java.lang.management.RuntimeMXBeanb getRuntimeMXBeand getInputArgumentsf java/util/Listh E Qij l (I)Ljava/lang/Object;inio java/util/regex/Patternq matcher 3(Ljava/lang/CharSequence;)Ljava/util/regex/Matcher;st
ru java/util/regex/Matcherw matchesy G
xz group (I)Ljava/lang/String;|}
x~ java/lang/Long? parseLong (Ljava/lang/String;)J??
??
@ java/lang/Runtime?
getRuntime ()Ljava/lang/Runtime;??
?? maxMemory? a
?? !maxDirectMemory: {} bytes (maybe)? valueOf (J)Ljava/lang/Long;??
?? maxDirectMemory: {} bytes? vmClass m Ljava/lang/reflect/Method; Ljava/util/regex/Matcher; mgmtFactoryClass runtimeClass runtime vmArgs $Ljava/util/List; Ljava/util/List; systemClassLoader Ljava/lang/ClassLoader; tmpdir0 io.netty.tmpdir? toDirectory "(Ljava/lang/String;)Ljava/io/File;??
? -Dio.netty.tmpdir: {}? java/io/File? java.io.tmpdir? &-Dio.netty.tmpdir: {} (java.io.tmpdir)? TEMP? java/lang/System? getenv?"
?? -Dio.netty.tmpdir: {} (%TEMP%)? USERPROFILE? \AppData\Local\Temp? 8-Dio.netty.tmpdir: {} (%USERPROFILE%\AppData\Local\Temp)? \Local Settings\Temp? 9-Dio.netty.tmpdir: {} (%USERPROFILE%\Local Settings\Temp)? + -Dio.netty.tmpdir: {} ($TMPDIR)? C:\Windows\Temp?
? ? /tmp? :Failed to get the temporary directory; falling back to: {}? warn?@? userprofile f java/lang/Exception? mkdirs? G
?? isDirectory? G
?? getAbsoluteFile? e
?? Ljava/lang/Exception; path bitMode0 io.netty.bitMode? (Ljava/lang/String;I)I ??
?? -Dio.netty.bitMode: {}? java/lang/Integer? (I)Ljava/lang/Integer;??
?? sun.arch.data.model? ,-Dio.netty.bitMode: {} (sun.arch.data.model)? )com.groupbyinc.flux.common.ibm.vm.bitmode? +-Dio.netty.bitMode: {} (com.ibm.vm.bitmode)? os.arch? trim??
amd64 x86_64 i386 i486 i586
i686 $-Dio.netty.bitMode: {} (os.arch: {}) 9(Ljava/lang/String;Ljava/lang/Object;Ljava/lang/Object;)V java.vm.name ([1-9][0-9]+)-?bit compile -(Ljava/lang/String;)Ljava/util/regex/Pattern;
r find G
x parseInt (Ljava/lang/String;)I
? arch vm BIT_PATTERN addressSize0 k Q
@& byteArrayBaseOffset0???????? byteArrayBaseOffset+ a
@, end ? ?
/ (JI)I ?1
@2 hashCodeAsciiSanitize (B)I45
@6 ? ?
8 (S)I4:
@; ? ?
= (I)I4?
@@
? this *Lio/netty/util/internal/PlatformDependent;
access$100 1()Lio/netty/util/internal/logging/InternalLogger; desiredAssertionStatusH G
II 4io/netty/util/internal/logging/InternalLoggerFactoryK getInstance B(Ljava/lang/Class;)Lio/netty/util/internal/logging/InternalLogger;MN
LO ;\s*-XX:MaxDirectMemorySize\s*=\s*([0-9]+)\s*([kKmMgG]?)\s*$Q? G
S2 G
U io.netty.noPreferDirectW
getBoolean (Ljava/lang/String;Z)ZYZ
?[D a
]( a
_? e
a? Q
c% Q
e java/nio/ByteOrderg nativeOrder ()Ljava/nio/ByteOrder;ij
hk
BIG_ENDIAN Ljava/nio/ByteOrder;mn ho
? 9 6 r
?
? isDebugEnabledv Gw -Dio.netty.noPreferDirect: {}y java/lang/Boolean{ (Z)Ljava/lang/Boolean;?}
|~ ?Your platform does not provide complete low-level API for accessing direct buffers reliably. Unless explicitly requested, heap buffer will always be preferred to avoid potential system instability.? info? ?? io.netty.maxDirectMemory? (Ljava/lang/String;J)J ??
??
h ? $-Dio.netty.maxDirectMemory: {} bytes? .io.netty.uninitializedArrayAllocationThreshold? hasAllocateArrayMethod? G
@? 4-Dio.netty.uninitializedArrayAllocationThreshold: {}? G
? #io/netty/util/internal/CleanerJava9? isSupported? G
??
? ? #io/netty/util/internal/CleanerJava6?
??
? ? tryAllocateUninitializedArray
ConstantValue Code LocalVariableTable LineNumberTable
StackMapTable
Exceptions Signature 5(Ljava/lang/Throwable;)V^TE; X()Ljava/util/concurrent/ConcurrentMap; Y(I)Ljava/util/concurrent/ConcurrentMap; Z(IF)Ljava/util/concurrent/ConcurrentMap; [(IFI)Ljava/util/concurrent/ConcurrentMap; LocalVariableTypeTable q(Ljava/util/Map<+TK;+TV;>;)Ljava/util/concurrent/ConcurrentMap; .()Ljava/util/Queue; /(I)Ljava/util/Queue; -(Ljava/lang/Class<*>;)Ljava/lang/ClassLoader; .()Ljava/util/Deque;
SourceFile InnerClasses 1 ! " ? # $ " ? % &