1. How can I decrease the stack usage for this function. How would I use the
MemPtrNew to allocate it in the heap instead of the stack?
Instead of
ComDB abc ;
use
ComDB *abc = (ComDB*)MemPtrNew( sizeof(ComDB) ) ;
...
MemPtrFree( abc ) ;
2.
yes - as above
----- Original Message -----
From: <[EMAIL PROTECTED]>
To: "Palm Developer Forum" <[EMAIL PROTECTED]>
Sent: Wednesday, August 25, 2004 3:40 PM
Subject: Re: stack overflow error
> Many thanks for all your help.
>
> I have set the stack pragma and I received the following compiler warning
message: 'function SaveFormDoCommand uses 2140 of stack'
>
> 1. How can I decrease the stack usage for this function. How would I use
the MemPtrNew to allocate it in the heap instead of the stack?
>
> 2. Also, this is the struct that I think is causing the stack overflow. It
is in the SaveFormDoCommand that I try to fill it up with data. I believe
that if I can reduce its stack usage, my problem is solved. Can aI lso use
MemPtrNew to allocate this struct in the heap instead of the stack? If so,
how can I go about it?
>
> typedef struct{
> char com1[30];
> char com2[30];
> char com3[30];
> char com4[30];
> char com5[30];
> char com6[30];
> char com7[30];
> char com8[30];
> char com9[30];
> char com10[30];
> char com11[30];
> char com12[30];
> char com13[30];
> char com14[30];
> char com15[30];
> char com16[30];
> char com17[30];
> char com18[30];
> char com19[30];
> char com20[30];
> char com21[30];
> char com22[30];
> char com23[30];
> char com24[30];
> char com25[30];
> char com26[30];
> char com27[30];
> char com28[30];
> char com29[30];
> char com30[30];
> char com31[30];
> char com32[30];
> char com33[30];
> char com34[30];
> char com35[30];
> char com36[30];
> char com37[30];
> char com38[30];
> char com39[30];
> char com40[30];
> char com41[30];
> char com42[30];
> char com43[30];
> char com44[30];
> char com45[30];
> char com46[30];
> char com47[30];
> char com48[30];
> char com49[30];
> char com50[30];
> char com51[30];
> char com52[30];
> char com53[30];
> char com54[30];
> char com55[30];
> char com56[30];
> char com57[30];
> char com58[30];
> char com59[30];
> char com60[30];
> char com61[30];
> } ComDB;
>
>
> Thanks in Advance.
>
>
> --
> For information on using the Palm Developer Forums, or to unsubscribe,
please see http://www.palmos.com/dev/support/forums/
--
For information on using the Palm Developer Forums, or to unsubscribe, please see
http://www.palmos.com/dev/support/forums/