Hi, Thanks for this information. Further can u please look into my understanding and correct me if i am wrong at any place. I have few other queries for which i need your expert comments:
1) Code Segment + Data Segment: size is equal to the size of the dex file. BUT, Is there a way by which we can divide the relevant memory size among these 2 segments?? 2) Heap: dynamic heap allotment can be known through the DDMS. BUT, how do we know what is the maximum permitted heap size?? 3) Stack: How do we know how much is the memory used up by the stack?? and whats the maximum permitted stack size?? 4) I believe, onLowMemory() is called when any of these 4 segments run out of space?? GOING AHEAD, i would like to know the working of the DVM. Can u please provide any good weblink to it?? Thanks in advance. Best Regards, Zhubham On Wed, Apr 15, 2009 at 8:44 AM, David Turner <[email protected]> wrote: > > > On Wed, Apr 15, 2009 at 3:26 PM, Zhubham <[email protected]> wrote: > >> >> Hi, >> >> This is regarding the dexdump collected. Can you please ellaborate a >> bit on the below mentioned queries. >> >> 1) registers_size >> description: the number of registers used by this code. >> >> >>>>Query: How many registers are available in total?? >> > > The Dalvik VM provides an "infinite" number of registers to code. Where > 'infinite' really means 65535 here :-) > You can see these registers as local variables in each method, though > registers 0-255 are usually faster to > access than those with higher numbers. > > >> 2) ins_size >> description: the number of words of incoming arguments to the method >> that this code is for. >> >>>>Query: Can you please ellaborate this a bit?? >> >> 3) outs_size >> description: the number of words of outgoing argument space required >> by this code for method invocation >> >>>>Query: Can you please ellaborate this a bit?? >> > > ins_size and out_size are related to the calling convention implemented in > the Dalvik VM. > > ins_size is essentially the number of parameters to the method's call > (except that a double > will take 2 ins_registers, and might force alignment issues). > > out_size is the number of registers where the function's result is stored > > >> Also, you had mentioned in ur last reply "Stack and heap are runtime >> changes, and are tricky to determine by simply looking at the >> DEX"........Which information in dex dump is actually talking about >> memory in bytes/KB etc?? can you please refer them?? >> >> I thank u once again for your time and patience. >> >> Thanks. >> >> Best Regards, >> Zhubham. >> ********************************* >> >> On Apr 15, 4:53 am, fadden <[email protected]> wrote: >> > On Apr 13, 7:21 pm, Sahil Arora <[email protected]> wrote: >> > >> > > (1) what is the size of code that actually goes inside the mobile >> phone to >> > > the DVM?? >> > >> > The entire DEX file is installed on the device. It's memory-mapped. >> > How much actually winds up in physical memory depends on how many of >> > the classes and methods are actually used. >> > >> > > (2) secondly, is it possible to know how much is the size of Code >> Segment, >> > > Data Segment, Stack, Heap are affected by adding some new >> functionalities in >> > > your application?? >> > >> > Code size + data size changes can be observed by looking at the size >> > of the DEX file. Stack and heap are runtime changes, and are tricky >> > to determine by simply looking at the DEX (heap moreso than stack). >> > DDMS provides some information on heap usage. >> > >> > > (3) Thirdly, since u seem to be more accustomed to dexdump command, >> so, can >> > > u please let me know what are the things that u would see in a dexdump >> file. >> > >> > dexdump displays much of the data in the DEX file. To understand what >> > it means, see the dex format documentation in dalvik/docs/dex- >> > format.html in the source tree. >> >> > > > > --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Android Discuss" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/android-discuss?hl=en -~----------~----~----~----~------~----~------~--~---
