In article <[EMAIL PROTECTED]>, Brian Mathis <[EMAIL PROTECTED]> wrote:

> On Wed, 21 Jun 2000, Nikul Patel wrote:
> > Hi ,
> > 
> > What's the best way of finding the size of available RAM storage on PalmIII?
> > Is there any API which will provide me this data? I appreciate your help.
> > 
> > NP
> 
> I've also been looking for this information.  I've got some methods that
> seem to work, but none of them return the same results that the Info
> screen does in the default launcher.  I'd like to be able to report the
> exact same information, so I don't have users complaining that my app is
> broken.
> 
> Does anyone at Palm have the authority to tell us exactly how *Palm* does
> it?

I don't know how *Palm* does it, but I do it like this (the result 
is stored in dbFree):

    dbFree = 0;
    for (i=0; i<MemNumCards(); i++) {
        for (j=0; j<MemNumRAMHeaps(i); j++) {
            heapId = MemHeapID(i, j);
            if (! MemHeapDynamic(heapId)) {
                MemHeapFreeBytes(heapId, &ul1, &ul2);
                dbFree += ul1;
            }
        }
    }

And the last time I have checked, it gave me a result, which is 
close enough to value of the launcher.
-- 
Remo Hofer <[EMAIL PROTECTED]>
http://www.geocities.com/SiliconValley/Cable/5206/



-- 
For information on using the ACCESS Developer Forums, or to unsubscribe, please 
see http://www.access-company.com/developers/forums/

Reply via email to