Problem with the heap size

by mystic-d » Sat, 17 May 2008 08:48:18 GMT


Sponsored Links
 Hi
I have developed an application and while running its giving heap size
problem , my application was just crashed (and not getting any
exception) ,  i saw in the DDMS that the heap size for my application
(that its my thought) is 1.316MB and i have free 336.176KB before i
start the new action, and when i start the action its crashing.

Can anyone help me to solve it... Is there any way to increase the
heap size ?
how it can be that an application will have only 1.3MB ?
Thanks !

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



Problem with the heap size

by Romain Guy » Sat, 17 May 2008 08:51:03 GMT


 Applications can use a 16 MB heap. It might be you are trying to
allocate too much memory at once, which would be 15 MB (approx.) in
this case.






-- 
Romain Guy
www.curious-creature.org

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


Sponsored Links


Problem with the heap size

by mystic-d » Sat, 17 May 2008 09:00:43 GMT


 it cant be that im trying to allocate 15MB at once or generally ( i
dont have so much data )... there is any way to check it ?
what is what im watching in the DDMS  that says that the HEAP size is
1.3MB and i free 336KB ?
Thanks !




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



Problem with the heap size

by Romain Guy » Sat, 17 May 2008 09:07:21 GMT


 Where do you see this? In the logs? If so, are you sure it's for your
process and not another one?

If you look at the VM information in DDMS, look at the logs to see why
your application is crashing.







-- 
Romain Guy
www.curious-creature.org

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



Problem with the heap size

by mystic-d » Sat, 17 May 2008 09:35:51 GMT


 I saw this at the DDMS , there is a small icon that im pressing on to
ENABLED the "update HEAP" and than in the right side there is a tab
with the heap information (this is what you called the VM information
in the DDMS ? )
where can i find a logs file inside the emulator ?  because in the
logCat i cant see nothing when its crashing..
thanks
--~--~---------~--~----~------------~-------~--~----~



Problem with the heap size

by Romain Guy » Sat, 17 May 2008 09:41:52 GMT


 In logcat you should see messages about the heap growing if you really
get out of heap space.






-- 
Romain Guy
www.curious-creature.org

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



Problem with the heap size

by mystic-d » Sat, 17 May 2008 10:01:02 GMT


 something is very strange because when i run it regularly (not in
debug mode) its work fine, but when im in debug mode , the application
is crashed (i think because im not getting to the next line in the
code..) and i cant see nothing in the logCat.

there is a log files inside the emulator ?

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



Problem with the heap size

by Romain Guy » Sat, 17 May 2008 10:02:19 GMT


 Seems like a bug in the VM actually.






-- 
Romain Guy
www.curious-creature.org

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



Problem with the heap size

by mystic-d » Sat, 17 May 2008 10:03:48 GMT


 when i say "i cant see nothing in the logCat" i mean that the logCat
was stop to work (i didnt see any message..  even when i restart the
application)
--~--~---------~--~----~------------~-------~--~----~



Problem with the heap size

by Amos » Sat, 17 May 2008 16:58:03 GMT


 This (logCat messages not appearing all of a sudden) happens
frequently to me. I never managed to isolate the cause, so it's just a
bit of annoying behavior I've come to live with :-). Restarting the
emulator or eclipse usually helps, not always.



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



Problem with the heap size

by trickybit » Mon, 19 May 2008 21:46:48 GMT


 Kill the emulator and eclipse, and then kill adb.exe (on windows at
least, and you use Task Manager/Processes to do it)... Restart works
reliably after that.





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



Problem with the heap size

by Gene Vayngrib » Tue, 20 May 2008 20:38:34 GMT


 I see the same all the time. Very time consuming to kill all and start
again. So, I discovered that even when logCat view stops working in
Eclipse - you can still run 'adb logcat' from the command line and it
works like a charm.
Another observation - with logcat view opened - our application
(bhoost.com) slows down a lot. Did not track it down to anything more
specific yet, but trying not to open logCat view in Debug perspective
anymore.




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



Other Threads

1. App losing downloads/active installs data





You're new around here, aren't you? =P

-------------------------------------------------------------------------------------------------
TreKing - Chicago transit tracking app for Android-powered devices
http://sites.google.com/site/rezmobileapps/treking

-- 

2. Ask Indro, buat boongin temen

Repost lagi, hehe..

Suhu suhi sekalian, ada aplikasi seru buat boongin temen, namanya *Ask
Indro.*
*
*
Cara maennya mirip kaya peteranswers.com.. hehe.. Silakan unduh di Market..
:D

Cara makenya:
- Coba ketik *,ini jawaban.answer: *di petition
- Terus isi question dengan terserah, lalu enter..
- Jawaban yang bakal muncul adalah *ini jawaban*
*- *Jangan lupa kasih rate :D
*
*
Biar lebih niat ngeboongin temennya, matiin dulu key previewnya, dan jangan
sampe salah ketik jawabannya... hehe :P

-- 
"Indonesian Android Community [id-android]" 

3. Android 2.1 upgrade for Sprint's HTC Hero leaks out

4. Aplikasi mirip peteranswers.com di Android

5. Indikator Batre

6. Another suhu in action

7. Projecting a display onto projector