Good point but I don't think it's a memory fragmentation thing because the files are so small.

Here is one example. My fonts have a binary and an texture. The binary is 6,763 bytes and I am getting a file not found and it reports 63852544 bytes free.

I also have had errors parsing the font file which has to be bad data since it works on so many others. In that case there was 32866304 bytes free.

I also have a small shared lib I made in C to handle the FloatBuffer performance problem. It's only 11k and it fails sometimes with a java.lang.ExceptionInInitializerError

Here is my free memory function.

    public long getFreeMemory()
    {
        MemoryInfo mi = new MemoryInfo();

ActivityManager activityManager = (ActivityManager)m_App.getActivity().getSystemService( Activity.ACTIVITY_SERVICE );

        activityManager.getMemoryInfo(mi);

        return mi.availMem;
    }




On 06/01/2012 11:29 AM, Mark Murphy wrote:
On Fri, Jan 6, 2012 at 11:18 AM, Leigh McRae
<[email protected]>  wrote:
I added
dumping the free memory when I get an out of memory error and I have
seen>16M free and none of my files are over 700k.
Bear in mind that Android does not have a compacting garbage
collector. Hence, you might have>16M free but not have a big enough
block for whatever it is you are loading. And, the file size of what
you are loading matters less than its memory footprint (e.g., a PNG
file may be small but still take up a lot of memory once
decompressed).

What are the files, in terms of file type and usage?


--
You received this message because you are subscribed to the Google
Groups "Android Developers" 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-developers?hl=en

Reply via email to