On Fri, Jan 6, 2012 at 11:49 AM, Leigh McRae
<[email protected]> wrote:
> 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.
Yeah, that doesn't sound like a memory fragmentation issue.
> 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;
>
> }
FWIW, here is Ms. Hackborn's thoughts on the subject of measuring memory usage:
http://stackoverflow.com/questions/2298208/how-to-discover-memory-usage-of-my-application-in-android/2299813#2299813
--
Mark Murphy (a Commons Guy)
http://commonsware.com | http://github.com/commonsguy
http://commonsware.com/blog | http://twitter.com/commonsguy
Android Training in NYC: http://marakana.com/training/android/
--
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