How to increase stack size of application
| Thu, 2004-11-04 06:54 | |
|
Hi All,
I have portes an application on Symbian series 60 platform using ver 7.0s Series60_v21. My application handle bigger data area so when it execute on hardware it crashes but it works fine on emulator. I want to increase stack size of any example file given with SDK. So How to increase the stack size. Hoping ur reply... thanks & rgds chandrashekhar |
|






Forum posts: 1379
Just a note - I wouldn't - the stack size is small for a reason.
didster
Forum posts: 122
I have added a line in my mmp file as follows but and given its size but it seems no effect
SRCDBG
OPTION GCC -save-temps
epocstacksize 16000
TARGET proj.app
TARGETTYPE app
UID 0x100039CE 0x102045A9
TARGETPATH \system\apps\proj
SOURCEPATH ..\src
SOURCE Proj.cpp
SOURCE ProjApplication.cpp
SOURCE ProjAppView.cpp
SOURCE ProjAppUi.cpp
SOURCE ProjDocument.cpp
Is it correct or have another way to do ?
Thanks alot.
chandrashekhar
Forum posts: 1379
didster
Forum posts: 122
Thanx for reply, i have used rounded value only as follows but still it does not solved my problem.
UID 0x100039CE 0x102045A9
TARGETPATH \system\apps\proj
EPOCSTACKSIZE 65536
thanx
Forum posts: 1379
It's not something people do that often for good reason
What exactly is your problem? How do you know it is the stack overflowing?
didster
Forum posts: 122
That why i guess that it might that it crashes because of stack overflow.
Thanx alot
Forum posts: 176
There are a couple things you can do
A) Try to get as much on the heap as you can
B) Put the conversion code into its own thread in the application, you can manually adjust the size of the stack in a thread using RThread::Create. Note: I didn't suggest you actually use threads, merely that it would allow you a means to adjust the stack size.
C) Move the conversion code into an executable and come up with a scheme for your application to call the executable for the conversion and wait for it (using a global semaphore or file system notifier, or other methods)
These are just ideas...
If possible, A) is probably the easiest of the above; it depends on your code size
One example of "C" working is Peter Yipton's UIQ port to Doom, which you can find on http://www.yipton.net/ .
Anyhow, good luck
Darin
Darin Dishneau
www.dishneau.com/symbian
Forum posts: 122
Actually u r right to have another thread for data coversion application and through global flag or other mechanism we have to check if data has generated.
But according to Simbian manual as they suggest try to avoid using multi thread because it is little slow and resource consuming. That why i have implemented in single thread as exmple code and integrated my application.
>>I believe the epocstacksize flag in the mmp file only allows you to adjust the size of the stack for an exe and not for an app.
Though manual does not say about adjusting stack size will only effective in exe not in .app but i think u r right.
Do you think active object concept will be better to use in place of another thread ?
Thanks & Rgds
chandrashekhar
Forum posts: 721
Is it possible to split these files to smaller pieces? That way, you wouldn't have to allocate too much memory for the whole data. I don't know if this suggestion makes sense, because I don't know MIDI and PCM file formats.
Cheers,
tOtE
Gabor Torok
Software architect, Agil Eight (http://www.agileight.com/)
Blog: http://mobile-thoughts.blogspot.com/
Forum posts: 122
Can any one know how much max stack size i can set in mmp file which will be allocated by target(series 60). I have heard that max allowed stack size is 16 KB even if setting 32 KB in mmp file. On actual target OS will only provide max 16 KB memory for stack to any application.
Do any one make me clear...
Thanks & Rgds
chandrashekhar