#Setting Stack Size
5 messages in this thread
Question for any of you C programmers. How do I go about setting the stack
size for my program. I know that the program will assume the stack size of
the CLI that it is running in etc.. but how would I make it so I can have a
different stack size. I am running into the problem when it comes to
writing doors for BBS programs. A lot of the BBS programs user VERY large
stacks and I dont want my program to be executed using a 60K or larger
stack! The standard 4K will suffice. I read that if the program is being
executed from workbench that it will take its stack size requirements from
the .info file and use that but what do I do in the case of another program
just running mine?
Any help would seriously be appreciated!
If you have SAS/C, there is info on how to change the stack size.
Well I am using Manx 5.2a and I thought that there was something on the
disk for it, but I got to find them first! What does SAS give for info? I
dont care if its assembly code or what, I can put it into my code with no
problem.
With SAS you just do a 'long __stklen = ????' or something close to that and
the startup does the rest. I think there is a place to chuck it in when you
do a "fork", as well as another place or so.
Hmm … well now all that I have to do is find something like that with
Manx. Time to call their support board I guess. Thanks anyways.