Source for native sun.misc.Unsafe operations in java
source link: https://www.codesd.com/item/source-for-native-sun-misc-unsafe-operations-in-java.html
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
Source for native sun.misc.Unsafe operations in java
i've downloaded "openjdk-6-src-b23-05_jul_2011" to have a look at the native implementations for the methods in sun.misc.Unsafe. e.g. compareAndSwapInt(...) but i am not able find anything in the downloaded sources of openjdk. i want to get an idea how these methods look like (i was interested in the atomic stuff the jdk provides).
could anybody point me to the right location(s)?
$ ls jdk/src/
linux share solaris windows
$ ls hotspot/src/os/
linux posix solaris windows
any help appreciated
marcel
Implementation of unsafe methods itself is not OS-specific, therefore it can be found in hotspot/src/share/vm/prims/unsafe.cpp
. It delegates to hotspot/src/share/vm/runtime/atomic.cpp
, which includes OS and CPU specific files, such as hotspot/src/os_cpu/windows_x86/atomic_windows_x86.inline.hpp
.
Related Articles
In Android, how to call sun.misc.Unsafe methods using Java reflection?
EXPECTED to sun.misc.Unsafe.park (native method)
Examples of forcing the release of native direct memory ByteBuffer assigned, using sun.misc.Unsafe?
** BUSTED ** How to speed up a search byte [] to be faster using sun.misc.Unsafe?
Using sun.misc.Unsafe to get the address of Java table elements?
Can you break a security manager with sun.misc.unsafe?
Tools for Debugging Bit-to-Bit Operations in Java
How set works for duplicate entry and delete operations in Java
Where can I find the source code for "native" methods in the Java library?
Applet error - java.lang.NoClassDefFoundError: sun / misc / ProxyGenerator
What is a free BLAS / LAPACK library (open source) for .net (C #)?
Is there a reminder for ng-bind-html-unsafe in AngularJS
Array Queue - recompiled with -xlint: unchecked / unsafe operations
Is the sun.misc package still available in java?
Recommend
About Joyk
Aggregate valuable and interesting links.
Joyk means Joy of geeK