Unsafe class in Android?

心已入冬 提交于 2019-12-08 19:08:46

问题


Do the Android Dalvik standard libraries have any class similar to the undocumented class sun.misc.Unsafe in Java SE which allows direct access to memory.


回答1:


Android implements parts of sun.misc.Unsafe, primarily to support the JSR-166 concurrency classes. It's not part of the Android API.




回答2:


It has the JNI bridge which could allow for just about anything but it's not "unsafe" since you have to code that into your app. As far as I know there is no exposed way to get out of the JVM sandbox (at least not without finding an exploit).



来源:https://stackoverflow.com/questions/5357390/unsafe-class-in-android

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!