We have a problem with showing the right amount of memory in Palm
professional. The code below works fine on OS 3.0 and above. Any ideas
what's wrong?

void
OSGetMemInfo(
 ULong* outRomSize,
 ULong* outRamBytes,
 ULong* outFreeByte)
{
 UInt  numOfCards = MemNumCards();
 ULong ram = 0L;
 ULong free = 0L;
 ULong max = 0L;
 ULong rom = 0L;

 *outRomSize = 0L;
 *outRamBytes = 0L;
 *outFreeByte = 0L;
 for (UInt i = 0; i < numOfCards; i++) {
      MemCardInfo(i, NULL, NULL, NULL, NULL, &rom, &ram, &free);
      *outRomSize += rom;
      *outRamBytes += ram;
 }
 MemHeapFreeBytes(1, &free, &max);
 *outFreeByte = free;
}


Regards,
Ramel Levin
CTO
The PalmMate Team

Gotta a Palm? Gotta visit www.PalmMate.com

Reply via email to