- r - 以节省内存的方式增长 data.frame
- ruby-on-rails - ruby/ruby on rails 内存泄漏检测
- android - 无法解析导入android.support.v7.app
- UNIX 域套接字与共享内存(映射文件)
我不太确定在android平台上linux进程中加载了哪种代码。
如果android采用Dalvik,进程中包含一个Dalvik VM和应用程序的代码,代码是Dalvik字节码形式吗?如果是,那么代码和.apk文件中的classes.dex是一样的吗?
如果android采用Android Runtime (ART),由于classes.dex已经被翻译成native machine code,所以我认为app在Linux进程中的代码不会是Dalvik byte-codes,而是native machine code。如果我的理解是正确的,那么进程中是否还包含 Dalvik VM?
最佳答案
从 Android 5.0(Lollipop) 开始,Dalvik 已完全替换为 Android Runtime(ART) ,它处理原生二进制文件。
<子> Verifying App Behavior on the Android Runtime
The Android runtime (ART) is the default runtime for devices running Android 5.0 (API level 21) and higher.
At install time, ART compiles apps using the on-device dex2oat tool. This utility accepts DEX files as input and generates a compiled app executable for the target device
更具体地说,Dalvik 提倡使用 odex 文件,这些文件是 dex 文件的预处理优化版本,供 Dalvik 解释或 JIT 编译。
ART 提倡使用 ELF 文件,这是一种通用格式,可指导将某些功能和对象链接到设备的 native 指令,并在安装时执行。
<子> Wikipedia - Android Runtime
Unlike Dalvik, ART introduces the use of ahead-of-time (AOT) compilation by compiling entire applications into native machine code upon their installation.
ART uses the same input bytecode as Dalvik, supplied through standard .dex files as part of APK files, while the .odex files are replaced with Executable and Linkable Format (ELF) executables. Once an application is compiled by using ART's on-device dex2oat utility, it is run solely from the compiled ELF executable
<子> Executable and Linkable Format - Applications
Android uses ELF .so (shared object) libraries for the Java Native Interface. With Android Runtime (ART), the default since Android 5.0 "Lollipop", all applications are compiled into native ELF binaries on installation
ART 不包含 Dalvik 实例,尽管大部分兼容,但有人提到 ART 不支持 Dalvik 支持的某些功能。
<子> Verifying App Behavior on the Android Runtime
However, some techniques that work on Dalvik do not work on ART. This document lets you know about things to watch for when migrating an existing app to be compatible with ART. Most apps should just work when running with ART.
关于java - android platfrom,Dalvik字节码或 native 机器码过程中的哪种代码?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/45951245/
我在 PID 上使用 showmap 命令,但我无法理解报告中的这一部分: 16384 3752 689 0 3132 0 620
在哪里可以找到 dalvik 操作码列表以及相应的允许操作数及其大小(8 位/16 位/32 位/62 位) 最佳答案 This给出 dalvik vm 中存在的每个操作码的所有详细信息和 this给
当我们在桌面系统上运行其他虚拟机时,是否可以直接在 Dalvik 虚拟机上执行任务? 最佳答案 如果我正确理解了您的问题:我正在考虑 task在问题中提到 apk (如果是这样,那么以下答案可能对 y
对此进行了一些研究,并发现了一些关于在应用程序中面临相同问题的人的帖子。我也在我的应用程序的谷歌控制台中遇到了这个崩溃,并关注了我发现的帖子( java.lang.ClassNotFoundExcep
我知道这可能是 Android 中的一个基本问题。但是什么是 Dalvik 和 dalvik-cache? 最佳答案 Dalvik 是 Android 使用的虚拟机。它通常被认为是一个 Java 虚拟
关于在运行时动态生成 java 字节码并将其加载到正在运行的 Dalvik VM 中,这个问题已被多次询问(并回答),但是有没有办法在运行时将 dex 文件/字节码加载到应用程序中? 谢谢 最佳答案
Android 中 Dalvik Bridge Function 和 Dalvik Native Function 调用有什么区别? 最佳答案 简单来说, Android 是基于 Linux 的操作系
我想获取标准 Java 库的 Dalvik 字节码,我的意思是,Android 使用的 java 库(例如 java.util.* 集合)。 我需要获取这些类文件,因为我想分析它们,不是全部,而是像
我正在尝试学习 smali,但有一些问题无法通过谷歌搜索找到。 1)我创建了一个简单的测试用例来更好地解释自己 const-string v1, "Start" :try_start_0 const-
在我的应用程序中,我将一些数据存储在 Application 类中: public HashMap> getConfigs() { if (mConfigs != null) {
Java 规范允许编译器和 VM 重新排序内存写入以提高效率。 Dalvik VM 是否具体利用了这一点? 免责声明:我无意依赖顺序,即使 Dalvik 不这样做(此外编译器也可能这样做),但很高兴知
我已经下载并安装了 SDK。但是我的手机没有显示在 Dalvik 调试监视器中。 请帮帮我,这是怎么回事?我已经杀死了服务器。并重新启动。但是 adb devices 没有列出我的设备。我知道在 ec
我有一个正在运行的 dalvik 实例: /system/bin/dalvikvm ... -Xmx100m ... memmap 看起来像: b01f6000-b05b7000 rwxp 00000
如果我知道变量的模式,例如 R.id.edit_x where x (1..N),我如何才能获得对给定 EditText 的引用,例如 findViewByID(R.id.edit_1)。 Dalvi
我刚刚做了一个基准测试来比较局部变量、成员变量、其他对象的成员变量和getter setter 的访问性能。基准测试在循环中增加了 10 次 mio 迭代的变量。这是输出: BENCHMARK:本地1
在我的 Dalvik 调试监视器中 在删除所有以前的日志消息后显示与以前的日志消息具有不同标记的新日志消息。这意味着日志一直在清除自身并且只显示几行。我将如何查看所有日志消息? 最佳答案 我也经常遇到
我试图了解为 Android 中的每个进程分配了多少内存。据我了解,对于每个应用程序进程,都有一个单独的 Zygote 进程实例,Zygote 将 fork Dalvik VM。 我写了一个小的示例
我使用的是 Android 2.2 SDK,无法让 MultiUserChat 类中的静态 block 执行。我试图将其强制加载为 try { String qual = MultiUserC
我们正在为 Android jelly bean 开发一个项目。我们的平台是arm-based,内核版本是3.1.10。在我们的开发过程中,我们发现在dalvik中发生应用崩溃的概率非常低。根据以下回
每个 ANR 转储都列出了 ANR 发生时所有线程的状态。我知道 WAIT 是什么意思,但是 SUSPENDED 和 MONITOR 是什么意思? 提前致谢... 最佳答案 Dalvik 线程状态总结
我是一名优秀的程序员,十分优秀!