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. How to delete textfiles from the device.

Hi, I'm currently downloading information from an online source which
is saved in a textfile on the device. i'm just wondering what function
is used in order to "clean out" the textfiles once the program has
ended. Thanks.

2. String comparison with Text in EditText with online data.

Hi, I'm trying to use the code below to connect to an online source,
then compare the data as it is read line by line against what is typed
in an EditText field before displaying the next page. At the moment
when I run it and press the "Sign In" button nothing happens. The
problem seems to be with the comparison of the data. Can anyone help.


                URL myURL = new URL("

                URLConnection conn = myURL.openConnection();

                BufferedReader is = new BufferedReader(new InputStreamReader
(conn.getInputStream(), "UTF-8"));

                String istr;
                EditText username = (EditText)findViewById(;
                String usrname = username.getText().toString();

                while ((istr = is.readLine()) != null)
                        if(is.readLine() == usrname)

                        Button button2 = (Button)findViewById(;

                    Button button3 = (Button)findViewById(;

                    Button button4 = (Button)findViewById(;

                    Button logout = (Button)findViewById(;


                }catch ( IOException e )
                Log.d(TAG, "Can not connect to the target server!" );
                try {
                                        throw new IOException();
                                } catch (IOException e1) {
                                        // TODO Auto-generated catch block

3. Maps API

4. Changing ringer volume

5. DDMS Heap view format

6. TrackBall an event states: is there always a ACTION_DOWN before ACTION_MOVE

7. Mailing List Subject Header