Hi Paul

Honestly, I don't know where you got GMemCardSlots from.

I use sdk 4.0, where MemoryMgr.h clearly states:
        UInt16 MemNumCards(void) SYS_TRAP(sysTrapMemNumCards);

It means, that the number of slots (theoretcally) could be up to 64K,
otherwise Palm guys would use Int16 instead of UInt16 simply because signed
arithmetic is usually faster than an unsigned one (for i386 it surely is!)

Now let me guess what you need it for ...

If you want to return a card number together with something which is 16bit
long as a single argument, just do it! For longer data (like local ID, or
mem handle), even cardnumber <16
assumption wouldn't guarantee success. What is wrong with having two
parameters passed by reference ?  If unsure, read K&R, or use C++ !


Michael


-----Original Message-----
From: Paul Nevai [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, 2 January 2002 8:39 AM
To: Palm Developer Forum
Subject: a MemNumCards() question...


We have UInt16 MemNumCards(void) which returns GMemCardSlots.  I would like
to know what is the greatest value of GMemCardSlots which I could expect to
see on all current Palm Powered handhelds so that I could use the high bits
for other purposes (OS < 5.0).

Is GMemCardSlots ever more than 16? May I count on it to be always less than
16? Is there a pointer to such a claim?

Thanks, Paul N.


-- 
For information on using the Palm Developer Forums, or to unsubscribe,
please see http://www.palmos.com/dev/tech/support/forums/

-- 
For information on using the Palm Developer Forums, or to unsubscribe, please see 
http://www.palmos.com/dev/tech/support/forums/

Reply via email to