for a PC, the default heap size for Java is 258 MB. what is the default heap size allocated to an Android application, say an activity starts and its created, how much memory does it get? I was curious since, phone has a limited memory space, would Google have decided a default memory allocation.
Asked
Active
Viewed 3,327 times
2
-
The default size isn't exactly 128MiB; it depends a lot on your architecture, your OS and probably other factors. – Sanjay T. Sharma Jun 25 '11 at 18:32
-
Here it says 128 MB, please see the 4th point under 10 points about...http://javarevisited.blogspot.com/2011/05/java-heap-space-memory-size-jvm.html#comment-form – randon Jun 25 '11 at 18:35
-
Sorry I should have mentioned 258 MB. – randon Jun 25 '11 at 18:37
-
2Android doesn't actually use JVM. It has Dalvik (DVM). – Amplify91 Jun 25 '11 at 18:40
-
1That article is incorrect for the given point, esp given that it doesn't point to any authoritative source. As as advice, you should be really careful reading stuff on the internet which is not supplemented by "official docs/links". :-) – Sanjay T. Sharma Jun 25 '11 at 18:51
1 Answers
2
EDIT: I was proven wrong my information was out of date. Its device dependant. G1 - 16mb Xoom - 48mb

BobMcboberson
- 2,065
- 2
- 13
- 13
-
1Check out the videos about memory management from Google's 2011 I/O conference. It depends on the android version, screen size, max memory, and if the application is requesting largeheap. It has an upper bound of 256mb i believe, for tablet-sized screens and largeheap requested – Eric Jun 25 '11 at 18:57