--- Lance <[EMAIL PROTECTED]> wrote:
>
> typedef struct typeListItems
> {
> Int16 Count;
> Boolean Expanded;
> Int8 Index;
> Int8 Level;
> Char* Name;
> struct typeListItems* Next;
> struct typeListItems* Child;
> struct typeListItems* Parent;
> } typeListItem;
>
> typeListItem mobjListItemSet[100];
> ...
>
> 1) Would this still cause problems with the 'Stack space'
> limit you refer to in your post?
Stack space is memory that is used to pass function arguments, return
results, and temporarily store local variables. Since a very limited
amount of memory is allocated to the stack for programs on Palm OS
devices, and because it is often difficult to determine how many times
a recursive function will be called, recursive functions can be very
dangerous. I would avoid using a recursive function if that is at all
possible.
> 2) In my initial testing I simply selected a fixed array size.
> Any suggestions on a scheme that would allow for 'variable size
> arrays'?
In C, there is very little difference between a pointer and an array.
So, you could use pointers. (For example, a linked list of "array"
elements.) However, see below...
> 3) 'Stringer' replied to my post and suggested that I store
> this in a database since a database is an 'indexed linked list'.
> Since I will want to store the information anyway this sounds
> like a good suggestion (presuming I can get databases to work).
> My question is, how do the memory manager and database manager
> compare in terms of data retrieval speeds?
Stringer's suggestion is a good one. Data stored by the database
manager is still RAM, so it is basically as fast as data stored by the
memory manager, *except* that the memory that the database manager
handles is protected and so there is a small amount of overhead to lock
and unlock the protected memory.
__________________________________________________
Do You Yahoo!?
Yahoo! Sports - sign up for Fantasy Baseball
http://sports.yahoo.com
--
For information on using the Palm Developer Forums, or to unsubscribe, please see
http://www.palmos.com/dev/tech/support/forums/