Android 应用保留 ART,还是更换为 Dalvik?


推出 Android L 后,虚拟机编译器将迁移至 ART (Android 运行时),而且仅迁移至面向 64 位的 ART。 ART 与 Dalvik 之间相比如何,这对于应用代码而言又意味着什么?

ART 是 AOT(提前)编译器,这表示 dex2oat 在应用初始安装过程中运行一次。 Dalvik 是 JIT(实时)编译器,仅在调用时运行。  为了获得更长的应用安装时间,ART 仅在调用应用之后释放处理器。  此外,新的垃圾回收程序和内存分配程序将减少暂停的次数和时间,这表示 ART 可提供更出色的响应能力并减少能耗。  但是请注意,运行时内存占用空间较少同样意味着编译二进制需要更高的存储。   ART 将配合 ARM、x86 和 MIPS 硬件一起使用,并在运行浮点运算时显示出极大的改进。

代码有何变化? ART 向后兼容,可以使用 Dex (Dalvik 可执行代码)字节代码格式。 因此,多数应用可以直接运行(甚至性能更高)。 


90 errors in open-source projects

There are actually 91 errors described in the article, but number 90 looks nicer in the title. The article is intended for C/C++ programmers, but developers working with other languages may also find it interesting.
  • C/C++
  • errors
  • bugs
  • PVS-Studio
  • code review
  • static code analyzer
  • Security Community
  • Code source libre
  • Informatique parallèle
  • Myths about static analysis. The second myth - expert developers do not make silly mistakes.

    While communicating with people on forums, I noticed there are a few lasting misconceptions concerning the static analysis methodology. I decided to write a series of brief articles where I want to show you the real state of things.

    The second myth is: "Expert developers do not make silly mistakes that are mostly caught by static code analyzers".

    This is how this statement looks in discussions on forums (this is a collective image):

    Big Brother helps you

    I was convinced one more time that programmers write programs absolutely carelessly, so that their programs work not because of their skill but due to chance and care of Microsoft or Intel compiler developers. Right it is they who really care and put crutches under our lop-sided programs when necessary.

    Further is a byte-rending story of the CString class and daughter of its, the Format function, for you to read.

    A Collection of Examples of 64-bit Errors in Real Programs

    This article is the most complete collection of examples of 64-bit errors in the C and C++ languages. The article is intended for Windows-application developers who use Visual C++, however, it will be useful for other programmers as well.
  • C/C++
  • errors
  • Intel 64
  • 64-bit
  • PVS-Studio
  • x86-64
  • Win64
  • Portage
  • S’abonner à errors