Path: csiph.com!x330-a1.tempe.blueboxinc.net!newsfeed.hal-mli.net!feeder1.hal-mli.net!news.linkpendium.com!news.linkpendium.com!newsfeeds.ihug.co.nz!lust.ihug.co.nz!ihug.co.nz!not-for-mail From: Lawrence D'Oliveiro Newsgroups: comp.lang.java.programmer Subject: =?UTF-8?B?QW5kcm9pZOKAlFdoeQ==?= Dalvik? Followup-To: comp.lang.java.programmer Date: Sun, 29 May 2011 12:48:48 +1200 Organization: Geek Central Lines: 19 Message-ID: NNTP-Posting-Host: 118-92-95-178.dsl.dyn.ihug.co.nz Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 8Bit X-Trace: lust.ihug.co.nz 1306630128 10635 118.92.95.178 (29 May 2011 00:48:48 GMT) X-Complaints-To: abuse@ihug.co.nz NNTP-Posting-Date: Sun, 29 May 2011 00:48:48 +0000 (UTC) User-Agent: KNode/4.4.7 Xref: x330-a1.tempe.blueboxinc.net comp.lang.java.programmer:4691 The Android Builders Summit had some interesting presentations, in particular Karim Yaghmour’s delving into the internals of Android, and Aleksander Gargenta’s “A Walk Through The Android Stack”. From 48:00 onwards, Gargenta explains why Android uses the Dalvik VM instead of the Java VM. * Why not Java SE? Too bloated, not suitable for low-power applications. * Why not Java ME? Too expensive, everything runs in one VM => lousy security. And you don’t get the necessary hardware access. Dalvik is purpose-built from the ground up; its .dex code is, even uncompressed, slightly smaller than a compressed .jar file. This simplifies class loading—a .apk file can be opened and mmap’d, and the code is ready for execution. (This is why zipalign is so important when building an Android app.) Dalvik is also register-based, not stack based, for higher performance.