A simple question - I hope

Common bugs/problems with the Android SDK the Emulator and the ADT-Plugin.

A simple question - I hope

Postby angleet » Sat Aug 07, 2010 6:29 am

I simply want to get the total Ram available on the device. I know how to get the available in MemoryInfo, but I really want to know what percentage of Ram is available, and so I need to know the total.

I tried using the Runtime methods, but this gives a bizarre low number. I tried looping through tasks to look at memory, but I am not experienced enough to know what the differences between privateDirty, privateShared, and pss memory are - and have yet to find some combination of adding them up with the available memory that seems to be anything close to the total. It seems there should be a simple way - Help? Do I have to go an ndk route just to get at /proc/meminfo or is that even possible?

Thank you,

An Android newbie
angleet
Once Poster
Once Poster
 
Posts: 1
Joined: Sat Aug 07, 2010 6:15 am

Top

Re: A simple question - I hope

Postby blundell » Sun Aug 08, 2010 6:19 pm

Here's some background info:
http://stackoverflow.com/questions/2201 ... on-android

I assume this is the method that gives the bizzarre low number: TotalMem

I can't find much more info. Could I ask why you need this detail?
User avatar
blundell
Master Developer
Master Developer
 
Posts: 1610
Joined: Tue Nov 18, 2008 12:58 pm
Location: UK

Top

Return to SDK/ADT/Emulator Problems

Who is online

Users browsing this forum: Google Feedfetcher and 6 guests