CompuServe Thread

#Setting Stack Size

5 messages in this thread
#25325From: Harold ScaddenJul 5, 1992 8:47 PM
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!
#25330From: Greg Comeau@Comeau CmptgJul 5, 1992 11:09 PM
If you have SAS/C, there is info on how to change the stack size.
#25339From: Harold ScaddenJul 6, 1992 4:59 AM
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.
#25344From: Greg Comeau@Comeau CmptgJul 6, 1992 8:41 AM
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.
#25354From: Harold ScaddenJul 6, 1992 4:24 PM
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.