Memory consumption of a typical Android implementation

by salza » Wed, 02 Sep 2009 16:56:23 GMT


Sponsored Links
 I have seen many benchmarks about Android but not yet found a
benchmark were the memory consumption of Android on a Qualcomm
processesor has been measured.
I have already found a discussion in here where someone emulated
Android but that is not representative for a smartphone evironment.
Has anyone of you already experimented with that and knows the typical
Flash an RAM consumption for the standard implementation with core
applications?


--~--~---------~--~----~------------~-------~--~----~



Memory consumption of a typical Android implementation

by lbcoder » Wed, 02 Sep 2009 21:22:53 GMT


 This can vary greatly from build to build and depends HEAVILY on the
optimizations selected.

Memory use is a really tricky one to measure -- the memory will
typically be full. As new applications are opened, old ones are dumped
and their memory reclaimed. This is mainly on an as-needed basis.

As for the flash memory install base... so far typical size is about
60MB, but again, you can add or remove features given this same space
by various available optimizations. Much of this may have to do with
the fact that the actual available space on DREAM hardware is 67.5MB.




--~--~---------~--~----~------------~-------~--~----~


Sponsored Links


Memory consumption of a typical Android implementation

by salza » Wed, 02 Sep 2009 23:33:26 GMT


 Sounds very interesting!
What optimizations are possible? I mean, does the user or the
developer select the optimization type?
Do you maybe know something where it is explained in detail?

Thanks!




--~--~---------~--~----~------------~-------~--~----~



Memory consumption of a typical Android implementation

by lbcoder » Thu, 03 Sep 2009 22:31:46 GMT


 At the very simplest level, compiler optimization, such as the "-O"
parameter for gcc. Also, use of executable compression, like "upx".
Compressed or optimized filesystems -- certain read-only filesystems
can be packed in a way that maps multiple segments of code that just
happen to match over to the same physical location... Leaving out
redundant code segments. Image optimizations (i.e. reduced colorspace,
pngcrush, etc). There are literally hundreds of little tricks that can
be used to make things (*MUCH*) smaller.






--~--~---------~--~----~------------~-------~--~----~



Other Threads

1. dexopt BUS error , optimization failed

Hi all,
          Trying to port dalvikvm on MIPS board , but while running
dexopt i'm getting BUS error ,
          below is the o/p of logcat command.

V/dalvikvm(  367): DexOpt: locking cache file /data/dalvik-cache/
sys...@framework@core....@classes.dex (fd=7, boot=1)
V/dalvikvm(  367): DexOpt:  locked cache file
V/dalvikvm(  367): checking deps, expecting vfy=1 opt=1
W/dalvikvm(  367): DexOpt: incorrect opt magic number (0xff ff ff ff)
D/dalvikvm(  367): Stale deps in cache file; removing and retrying
V/dalvikvm(  367): DexOpt: locking cache file /data/dalvik-cache/
sys...@framework@core....@classes.dex (fd=7, boot=1)
V/dalvikvm(  367): DexOpt:  locked cache file
V/dalvikvm(  367): DexOpt: successfully initialized new cache file
D/dalvikvm(  367): DexOpt: --- BEGIN 'core.jar
V/dalvikvm(  367): DexOpt: waiting for verify+opt, pid=368
V/dalvikvm(  368): Args: fd=7 off=40 len=3590960 name='/system/
framework/core.jar
V/dalvikvm(  368):   bootclasspath is ''
V/dalvikvm-heap(  368): Creating VM heap of size 2097152
V/dalvikvm(  368): threadid=3: interp stack at 0x2baf0000
V/dalvikvm(  368): LinearAlloc: created region at
0x2baf2000-0x2bef1fff
V/dalvikvm(  368): Continuing optimization (/system/framework/core.jar
I//system/bin/msntp-P(  369): msntp
I//system/bin/msntp-P(  369): msntp
I/logwrapper(  369): /system/bin/msntp
V/dalvikvm(  368): +++ swapping bytes
V/dalvikvm(  368): +++ swapping and verifying
V/dalvikvm(  368): +++ DEX 0x89e00: allocateAux 27328+2930+24798+9926
* 4 = 259928 bytes
V/dalvikvm(  368): Class lookup: classes=2779 slots=8192 (33% occ)
alloc=98312 total=789 max=13
V/dalvikvm(  368): DexOpt: +++ trying to load 2779 classes
V/dalvikvm(  368): +++ dvmAddClassToHash 'Ljava/lang/Class;' 0x0
(isnew=1) --> 0x2aab0350
V/dalvikvm(  368): +++ dvmAddClassToHash 'Ljava/lang/Object;' 0x0
(isnew=1) --> 0x2aab03f8
V/dalvikvm(  368): +++ dvmAddClassToHash 'Ljava/io/Serializable;
V/dalvikvm(  368): +++ dvmAddClassToHash 'Ljava/lang/reflect/
AnnotatedElement;
V/dalvikvm(  368): +++ dvmAddClassToHash 'Ljava/lang/reflect/
GenericDeclaration;
V/dalvikvm(  368): +++ dvmAddClassToHash 'Ljava/lang/reflect/Type;'
0x0 (isnew=1) --> 0x2aab0698
V/dalvikvm(  368): --- LinearRealloc(272) old=276
V/dalvikvm(  368): +++ explicitly initializing Ljava/lang/Class;
V/dalvikvm(  368): +++ dvmAddClassToHash 'Ljava/lang/String;' 0x0
(isnew=1) --> 0x2aab0740
V/dalvikvm(  368): +++ dvmAddClassToHash 'Ljava/lang/Comparable;
V/dalvikvm(  368): +++ dvmAddClassToHash 'Ljava/lang/CharSequence;
V/dalvikvm(  368): --- LinearRealloc(244) old=260
V/dalvikvm(  368): +++ dvmAddClassToHash 'Ljava/lang/Throwable;
V/dalvikvm(  368): --- LinearRealloc(84) old=92
V/dalvikvm(  368): Array class '[Ljava/lang/Object;
V/dalvikvm(  368): +++ dvmAddClassToHash 'Ljava/lang/Cloneable;' 0x0
(isnew=1) --> 0x2aab0a88
V/dalvikvm(  368): +++ dvmAddClassToHash '[Ljava/lang/Object;' 0x0
(isnew=1) --> 0x2aab09e0
V/dalvikvm(  368): Created array class '[Ljava/lang/Object;
V/dalvikvm(  368): +++ dvmAddClassToHash 'Ljava/lang/System;' 0x0
(isnew=1) --> 0x2aab0b30
V/dalvikvm(  368): +++ dvmAddClassToHash 'Ljava/lang/SecurityManager;
V/dalvikvm(  368): +++ dvmAddClassToHash 'Ldalvik/system/VMStack;
V/dalvikvm(  368): +++ dvmAddClassToHash 'Ljava/lang/ClassLoader;
V/dalvikvm(  368): THROW 'Ljava/lang/VerifyError;'
msg='java.lang.Class' cause=(none)
V/dalvikvm(  368): +++ dvmAddClassToHash 'Ljava/lang/VerifyError;' 0x0
(isnew=1) --> 0x2aab0dd0
V/dalvikvm(  368): +++ dvmAddClassToHash 'Ljava/lang/LinkageError;
V/dalvikvm(  368): +++ dvmAddClassToHash 'Ljava/lang/Error;
V/dalvikvm(  368): THROW 'Ljava/lang/VerifyError;'
msg='Ljava.lang.Error;' cause=(none)
E/dalvikvm(  368): Too many exceptions during init (failed on 'Ljava/
lang/VerifyError;' 'Ljava.lang.Error;')
E/dalvikvm(  368): VM aborting
I/DEBUG   (  171): *** *** *** *** *** *** *** *** *** *** *** *** ***
*** *** ***
I/DEBUG   (  171): Build fingerprint: 'unknown'
I/DEBUG   (  171): pid: 368, tid: 368  >>> /system/bin/dexopt <<<
I/DEBUG   (  171): signal 10 (SIGBUS), fault addr 00000000


Does anybody have any idea, why this is happening ? any pointer or any
info about dexopt code region where padding is done would be helpful.

Regards,
DJ

-- 
unsubscribe: android-porting+unsubscr...@googlegroups.com
website: 

2. HTC Hero handset it not show any decimal point in my application

Hi all,
I face a problem when I run my application on HTC Hero 1.5 handset . I
use formatted text in EditText (ie 0.00) but in HTC Hero handset it
not show any decimal point, while in emulator as well as G1, Nexus
handset it works fine.
Why this happen?? Anybody can help me ASAP.

-- 

3. ListView vs. GridView vs. TableLayout

4. Fullscreen and SurfaceView

5. Unable to browse /sdcard, permissions d---------

6. ACTION_USER_PRESENT ... what of reverse condition?

7. New to Android...how does android handle application versions/updates...