request max heapsize?

by Tomasz » Sun, 15 May 2011 00:31:20 GMT

Sponsored Links
 Hi guys,

Is there a way for an application to request a larger than normal
maximum heap size? I have an application which needs around 100mb RAM
(and this is with lots of tricks to decrease memory usage).

Newer phones with 500mb+ should have no problem coping with this. Any
advice is very much appreciated.



Re: request max heapsize?

by Tomasz » Sun, 15 May 2011 00:59:58 GMT

 I have found some references to a manifest file attribute,
However if I try and use this I get the following error on
error: No resource identifier found for attribute 'largeheap' in
package 'android'


Sponsored Links

Re: Re: request max heapsize?

by Harri Smæ°“tt » Sun, 15 May 2011 01:51:29 GMT


android:largeHeap="true" is mentioned here; #getLargeMemoryClass%28%29

It's API level 11 method, could it be so that this attribute is too?



Re: Re: request max heapsize?

by Dianne Hackborn » Sun, 15 May 2011 02:27:03 GMT

 Yes this was introduced in 3.0.

2011/5/14 Harri Smtt <>

Dianne Hackborn
Android framework engineer

Note: please don't send private questions to me, as I don't have time to
provide private support, and so won't reply to such e-mails.  All such
questions should be posted on public forums, where I and others can see and
answer them.


Other Threads

1. Sending Packets via UDP over a WIFI connection

Hi All,

I am trying to send UDP packets over a WIFI connection from my phone
to a Server on my pc. Here is the code that I have on my client:

 String data = "Testing";
 byte [] buffer = data.getBytes();

 DatagramPacket packet = new DatagramPacket(buffer, buffer.length,
                new InetSocketAddress(ipaddress, port));

 DatagramSocket socket = new DatagramSocket(5003);

I have tried this code in a Java app sending from my laptop to my
desktop and it works fine. I am assuming its because I am not setting
up the WIFI connection properly that it is not working on my phone.
Any ideas?


2. Need a Nexus One tester with logcat


I am trying to figure out why my app forces close immediately on a
nexus one (recurring comment which is dragging my rating down).

Ironically, I heard a rumor that if I had just a half star more (up to
3.5 from 3), I would qualify to get a free nexus one from google.

If anybody has a nexus one and can connect it up to get the logcat
dump of the stack trace of the error, I would be very thankful.

You can find my app by searching for "Compass Ball" on the market.

Thanks in advance,


3. Leaking Service ... vs. stopped service. middle ground??

4. G1 Upgrade to 1.6???

5. Simple Call to a Timer.Schedule fails

6. "android.speech.action.RECOGNIZE_SPEECH" activity not found

7. drawing video frames as a background through opengl