classes.io.netty.util.internal.PlatformDependent.class Maven / Gradle / Ivy
???? 2_ (io/netty/util/internal/PlatformDependent java/lang/Object PlatformDependent.java :io/netty/util/internal/PlatformDependent$AtomicLongCounter AtomicLongCounter -io/netty/util/internal/PlatformDependent$Mpsc Mpsc *io/netty/util/internal/PlatformDependent$1 logger /Lio/netty/util/internal/logging/InternalLogger; "MAX_DIRECT_MEMORY_SIZE_ARG_PATTERN Ljava/util/regex/Pattern;
IS_ANDROID Z
IS_WINDOWS IS_ROOT Ljava/lang/Boolean; JAVA_VERSION I !CAN_ENABLE_TCP_NODELAY_BY_DEFAULT IS_EXPLICIT_NO_UNSAFE
HAS_UNSAFE CAN_USE_CHM_V8 DIRECT_BUFFER_PREFERRED MAX_DIRECT_MEMORY J MPSC_CHUNK_SIZE MIN_MAX_MPSC_CAPACITY DEFAULT_MAX_MPSC_CAPACITY MAX_ALLOWED_MPSC_CAPACITY@ BYTE_ARRAY_BASE_OFFSET
HAS_JAVASSIST TMPDIR Ljava/io/File; BIT_MODE ADDRESS_SIZE USE_DIRECT_BUFFER_NO_CLEANER DIRECT_MEMORY_COUNTER (Ljava/util/concurrent/atomic/AtomicLong; DIRECT_MEMORY_LIMIT BIG_ENDIAN_NATIVE_ORDER $assertionsDisabled isAndroid ()Z 6 isWindows 9 isRoot < isRoot0 > 5
? java/lang/Boolean A valueOf (Z)Ljava/lang/Boolean; C D
B E java/lang/Throwable G booleanValue I 5
B J javaVersion ()I N canEnableTcpNoDelayByDefault Q hasUnsafe T isUnaligned )io/netty/util/internal/PlatformDependent0 W V 5
X Y directBufferPreferred \ maxDirectMemory ()J ` hasJavassist ) c tmpdir ()Ljava/io/File; * + g bitMode , j addressSize - m allocateMemory (J)J o p
X q size
freeMemory (J)V t u
X v address throwException (Ljava/lang/Throwable;)V S 5
{ y z
X } throwException0 z
? t Ljava/lang/Throwable; newConcurrentHashMap &()Ljava/util/concurrent/ConcurrentMap; ? 0io/netty/util/internal/chmv8/ConcurrentHashMapV8 ? ()V ? ?
? ? &java/util/concurrent/ConcurrentHashMap ?
? ? newLongCounter &()Lio/netty/util/internal/LongCounter; (io/netty/util/internal/chmv8/LongAdderV8 ?
? ? /(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 4 5
? ? ?
X ? buffer Ljava/nio/ByteBuffer; directBufferAddress (Ljava/nio/ByteBuffer;)J ? ?
X ? directBuffer (JI)Ljava/nio/ByteBuffer; #hasDirectBufferNoCleanerConstructor ? 5
X ? newDirectBuffer ? ?
X ? 'java/lang/UnsupportedOperationException ? Lsun.misc.Unsafe or java.nio.DirectByteBuffer.(long, int) not available ? (Ljava/lang/String;)V ? ?
? ?
memoryAddress getObject '(Ljava/lang/Object;J)Ljava/lang/Object; ? ?
X ? object Ljava/lang/Object; fieldOffset getObjectVolatile ? ?
X ? getInt (Ljava/lang/Object;J)I ? ?
X ? objectFieldOffset (Ljava/lang/reflect/Field;)J ? ?
X ? field Ljava/lang/reflect/Field; getByte (J)B ? ?
X ? getShort (J)S ? ?
X ? (J)I ? ?
X ? getLong ? p
X ? ([BI)B ? ?
X ? data [B index ([BI)S ? ?
X ? ([BI)I ? ?
X ? ([BI)J ? ?
X ? getLongSafe 2 ? 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 hashCodeAsciiSanitizsByte (C)I C putOrderedObject ((Ljava/lang/Object;JLjava/lang/Object;)V
X putByte (JB)V"#
X$ B putShort (JS)V'(
X) S putInt (JI)V,-
X. putLong (JJ)V01
X2 ([BIB)V"4
X5 ([BIS)V'7
X8 ([BII)V,:
X; ([BIJ)V0=
X>
copyMemory (JJJ)V@A
XB srcAddr dstAddr length ([BIJJ)V ( H *(Ljava/lang/Object;JLjava/lang/Object;JJ)V@J
XK src srcIndex (J[BIJ)V dst dstIndex setMemory ([BIJB)V (Ljava/lang/Object;JJB)VRT
XU (JJB)VRW
XX allocateDirectNoCleaner (I)Ljava/nio/ByteBuffer; 3 \ . ^ java/lang/AssertionError`
a ? incrementMemoryCounterc ?
dZ[
Xf decrementMemoryCounterh ?
i
} e capacity reallocateDirectNoCleaner -(Ljava/nio/ByteBuffer;I)Ljava/nio/ByteBuffer; java/nio/ByteBufferpm M
qrno
Xt len freeDirectNoCleaner / 0 x &java/util/concurrent/atomic/AtomicLongz get| _
{} 1 -io/netty/util/internal/OutOfDirectMemoryError? java/lang/StringBuilder?
? ? failed to allocate ? append -(Ljava/lang/String;)Ljava/lang/StringBuilder;??
?? (I)Ljava/lang/StringBuilder;??
?? ! byte(s) of direct memory (used: ? (J)Ljava/lang/StringBuilder;??
?? , max: ? (C)Ljava/lang/StringBuilder;??
?? toString ()Ljava/lang/String;??
??
? ?
compareAndSet (JJ)Z??
{?
usedMemory
newUsedMemory addAndGet? p
{? useDirectBufferNoCleaner equals
([BI[BII)Z unalignedAccess? 5
X?
equalsSafe??
???
X? bytes1 startPos1 bytes2 startPos2 equalsConstantTime
([BI[BII)I (io/netty/util/internal/ConstantTimeUtils???
??
X?
hashCodeAscii ([BII)I hashCodeAsciiSafe??
???
X? startPos (Ljava/lang/CharSequence;)I²?5F M?
?
?
? i remainingBytes newAtomicReferenceFieldUpdater ^(Ljava/lang/Class;Ljava/lang/String;)Ljava/util/concurrent/atomic/AtomicReferenceFieldUpdater;??
X? tclass Ljava/lang/Class<-TU;>; Ljava/lang/Class; fieldName Ljava/lang/String; newAtomicIntegerFieldUpdater \(Ljava/lang/Class;Ljava/lang/String;)Ljava/util/concurrent/atomic/AtomicIntegerFieldUpdater;??
X? Ljava/lang/Class<-TT;>; newAtomicLongFieldUpdater Y(Ljava/lang/Class;Ljava/lang/String;)Ljava/util/concurrent/atomic/AtomicLongFieldUpdater;??
X? 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;??
X? clazz Ljava/lang/Class<*>; getContextClassLoader ()Ljava/lang/ClassLoader;
X getSystemClassLoader
X newConcurrentDeque ()Ljava/util/Deque; L M
(java/util/concurrent/LinkedBlockingDeque
? *java/util/concurrent/ConcurrentLinkedDeque
?
isAndroid0 android.app.Application
java/lang/Class forName =(Ljava/lang/String;ZLjava/lang/ClassLoader;)Ljava/lang/Class;
Platform: Android -io/netty/util/internal/logging/InternalLogger debug! ? " android ignored
isWindows0 os.name' ) )io/netty/util/internal/SystemPropertyUtil+ 8(Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String;|-
,. java/util/Locale0 US Ljava/util/Locale;23 14 java/lang/String6 toLowerCase &(Ljava/util/Locale;)Ljava/lang/String;89
7: win< contains (Ljava/lang/CharSequence;)Z>?
7@ Platform: WindowsB windows java/lang/InterruptedExceptionE java/io/IOExceptionG java/lang/ExceptionI 8 5
K /usr/bin/idM /bin/idO /usr/xpg4/bin/idQ idS ^(?:0|[1-9][0-9]*)$U java/util/regex/PatternW compile -(Ljava/lang/String;)Ljava/util/regex/Pattern;YZ
X[ [Ljava/lang/String;] java/lang/Runtime_
getRuntime ()Ljava/lang/Runtime;ab
`c -ue exec (([Ljava/lang/String;)Ljava/lang/Process;gh
`i java/io/BufferedReaderk java/io/InputStreamReaderm java/lang/Processo getInputStream ()Ljava/io/InputStream;qr
ps io/netty/util/CharsetUtilu US_ASCII Ljava/nio/charset/Charset;wx vy 2(Ljava/io/InputStream;Ljava/nio/charset/Charset;)V ?{
n| (Ljava/io/Reader;)V ?~
l readLine??
l? close? ?
l? waitFor? M
p? destroy? ?
p? matcher 3(Ljava/lang/CharSequence;)Ljava/util/regex/Matcher;??
X? java/util/regex/Matcher? matches? 5
?? UID: {}? '(Ljava/lang/String;Ljava/lang/Object;)V!? ? 0? (Ljava/lang/Object;)Z??
7? ^Could not determine the current UID using /usr/bin/id; attempting to bind at privileged ports.? .*(?:denied|not.*permitted).*? java/net/ServerSocket?
? ? setReuseAddress (Z)V??
?? java/net/InetSocketAddress?
? ? bind (Ljava/net/SocketAddress;)V??
?? isDebugEnabled? 5 ? $UID: 0 (succeded to bind at port {})? java/lang/Integer? (I)Ljava/lang/Integer; C?
??
??
getMessage??
J?8?
7? 6UID: non-root (failed to bind at any privileged ports)? exitCode p Ljava/lang/Process; in Ljava/io/BufferedReader; uid idCmd arr$ len$ i$ message Ljava/lang/Exception; ss Ljava/net/ServerSocket; ID_COMMANDS UID_PATTERN PERMISSION_DENIED javaVersion0 (majorVersionFromJavaSpecificationVersion? M
? Java version: {}? majorVersion java/lang/SecurityException?
? java/security/AccessController? doPrivileged 4(Ljava/security/PrivilegedAction;)Ljava/lang/Object;??
?? (Ljava/lang/String;)I??
? ;security exception while reading java.specification.version? *(Ljava/lang/String;Ljava/lang/Throwable;)V!? ? javaSpecVersion Ljava/lang/SecurityException; \.? split '(Ljava/lang/String;)[Ljava/lang/String;??
7? [I? parseInt??
??
components version explicitNoUnsafe0 io.netty.noUnsafe?
getBoolean (Ljava/lang/String;Z)Z?
, -Dio.netty.noUnsafe: {} 0sun.misc.Unsafe: unavailable (io.netty.noUnsafe) io.netty.tryUnsafe (Ljava/lang/String;)Z>
,
org.jboss.netty.tryUnsafe Ksun.misc.Unsafe: unavailable (io.netty.tryUnsafe/org.jboss.netty.tryUnsafe) tryUnsafe noUnsafe
hasUnsafe0 &sun.misc.Unsafe: unavailable (Android)
X { sun.misc.Unsafe: {} available unavailable maxDirectMemory0 sun.misc.VM ^ getDeclaredMethod @(Ljava/lang/String;[Ljava/lang/Class;)Ljava/lang/reflect/Method;"#
$ java/lang/reflect/Method& invoke 9(Ljava/lang/Object;[Ljava/lang/Object;)Ljava/lang/Object;()
'* java/lang/Number, longValue. _
-/ &java.lang.management.ManagementFactory1 "java.lang.management.RuntimeMXBean3 getRuntimeMXBean5 getInputArguments7 java/util/List9 s M:; = (I)Ljava/lang/Object;|?:@ group (I)Ljava/lang/String;BC
?D java/lang/LongF parseLong (Ljava/lang/String;)JHI
GJ
7 @ maxMemoryS _
`T !maxDirectMemory: {} bytes (maybe)V (J)Ljava/lang/Long; CX
GY maxDirectMemory: {} bytes[ vmClass m Ljava/lang/reflect/Method; Ljava/util/regex/Matcher; mgmtFactoryClass runtimeClass runtime vmArgs $Ljava/util/List; Ljava/util/List;
hasJavassist0 io.netty.noJavassisth -Dio.netty.noJavassist: {}j -Javassist: unavailable (io.netty.noJavassist)l
? =io/netty/util/internal/JavassistTypeParameterMatcherGeneratoro generate W(Ljava/lang/Class;Ljava/lang/ClassLoader;)Lio/netty/util/internal/TypeParameterMatcher;qr
ps Javassist: availableu Javassist: unavailablew ?You don't have Javassist in your class path or you don't have enough permission to load dynamically generated classes. Please check the configuration for better performance.y noJavassist tmpdir0 io.netty.tmpdir} &(Ljava/lang/String;)Ljava/lang/String;|
,? 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 mkdirs? 5
?? isDirectory? 5
?? getAbsoluteFile? f
?? path bitMode0 io.netty.bitMode? (Ljava/lang/String;I)I ??
,? -Dio.netty.bitMode: {}? sun.arch.data.model? ,-Dio.netty.bitMode: {} (sun.arch.data.model)? com.ibm.vm.bitmode? +-Dio.netty.bitMode: {} (com.ibm.vm.bitmode)? os.arch? trim??
7? 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? find? 5
?? arch vm BIT_PATTERN addressSize0 l M
X? j end ? ?
? (JI)I
?
X? hashCodeAsciiSanitize (B)I??
X? ?
? (S)I??
X? ?
? (I)I?
X
? this *Lio/netty/util/internal/PlatformDependent;
access$100 1()Lio/netty/util/internal/logging/InternalLogger; desiredAssertionStatus 5
4io/netty/util/internal/logging/InternalLoggerFactory getInstance B(Ljava/lang/Class;)Lio/netty/util/internal/logging/InternalLogger;
;\s*-XX:MaxDirectMemorySize\s*=\s*([0-9]+)\s*([kKmMgG]?)\s*$ 5
&