Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!mailrus!uunet!van-bc!ubc-cs!alberta!arcsun.arc.ab.ca!calgary!enme.UCalgary.CA!stauffer From: stauffer@enme.UCalgary.CA (Ken Stauffer) Newsgroups: comp.sys.tandy Subject: Tandy 6000 stack probes - question Message-ID: <1990May31.173301.25856@calgary.uucp> Date: 31 May 90 17:33:01 GMT Sender: news@calgary.uucp (Network News Manager) Reply-To: stauffer@enme.UCalgary.CA (Ken Stauffer) Organization: U. of Calgary, Calgary, Alberta, Canada Lines: 34 Does anyone understand how the stack-probes are implemented on a Tandy 6000 running Xenix? In particular how does Xenix increase the stack space of a process, and how does the 'tstb' instruction (see below) help xenix accomplish this? Also, is the stack space of a process fixed, or can it grow as large as available memory? Below is assembly of the header of a C function, generated by the C compiler. The highlighted line is the stack probe. C functions which are compiled with the -K option (no stack probes), do not generate this line. The constant LM1, seems to be related to the amount of stack space needed by the function for calling other functions. .data .text .globl _f _f: link a6,#-.LF1 >>>>>>>> tstb -.LM1-132(sp) <<<<<<<<<<< moveml #.LS1,-(a7) I am writting an alloca() function which increases the stack frame size of the caller of alloca(), I am running into a problem with large alloca requests which get a segmentation violation. I was thinking that I could have my alloca routine do the nessesary 'tstb' equivilant, and thus ensure proper stack growth... Thanks, Ken Stauffer.