GetTotalRAM?

Login to reply to this topic.
Wed, 2008-03-19 14:12
Joined: 2007-10-30
Forum posts: 7

Hi,
HAL::Get ( HALData::EMemoryRAM, TInt ramSize ) returns the Total RAM in ramSize.
As Total RAM is device dependent param, where the value of Total RAM is stored and how it retrived?

/Ganesh


Thu, 2008-03-20 09:44
Forum Nokia Champion
Joined: 2003-06-10
Forum posts: 680
Re: GetTotalRAM?

It may not be a fixed value/constant/variable, but actually obtained by calculating how much the hw reports to the OS. (Unlike the CPU speed HAL value, which is not calculated, but a fixed value/constant, which often is not correct for the device.)

How it is actually done, I don't know; maybe you need to license Symbian OS source code to see, unless it is a base porting, manufacturer and device specific mechanism, in which case you need the info from each device manufacturer (for each device).

Why do you care how the HAL::Get API gets (retrieves) the info, as long as it gets it?

Mon, 2008-03-24 06:13
Joined: 2007-10-30
Forum posts: 7
Re: GetTotalRAM?

On an emulator ( 5.0 and 3.0 sdk ), it returns a fixed value of 54 MB. I'm working on a customized memory manager where in i should get the total RAM size and cap it across all platforms ( windows/linux/maemo ). On windows, i will get the total RAM size of the hardware but not the emulated device. Therefor i posted where the device dependent value is stored for the emulator so that i can hardcode it in my application for the particular device.

/Ganesh

Mon, 2008-03-24 09:44
Joined: 2007-09-15
Forum posts: 57
Re: GetTotalRAM?

Hi Ganesh

Even if there be some fixed place to store this value, it will never be the exact amount of RAM as there will be some part which will be taken up by the processes running on the device and further, the theoratical and practical sizes of the memory is never the same. There is an application called "TaskSpy", you can get the sourcecode for the same on the net. They show a graphical representation of the free RAM available. Try checking that out. I tried the 2nd edition application about one and a half years back.

Thu, 2008-03-27 12:50
Joined: 2004-11-29
Forum posts: 1075
Re: GetTotalRAM?

- [removed] -

  • Login to reply to this topic.