Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!zaphod.mps.ohio-state.edu!swrinde!cs.utexas.edu!rutgers!cbmvax!cbmehq!cbmdeo!jsmami!jsmoller From: jsmoller@jsmami.UUCP (Jesper Steen Moller) Newsgroups: comp.sys.amiga.programmer Subject: Re: Mike Farren Tutorial. Message-ID: <18e9d22d.ARN11ed@jsmami.UUCP> Date: 31 Mar 91 16:40:17 GMT References: <20115@cbmvax.commodore.com> <1991Mar27.012717.11541@starnet.uucp> <1998@aldebaran.cs.nps.navy.mil> <1991Mar27.175514.25590@cunixf.cc.columbia.edu> <00670283123@elgamy.RAIDERNET.COM> <91089.151122DXB132@psuvm.psu.edu> Reply-To: cbmehq!cbmdeo!jsmami!jsmoller (Jesper S. Moller) Followup-To: comp.sys.amiga.programmer Organization: Danish SofTech Lines: 35 In article <91089.151122DXB132@psuvm.psu.edu>, DXB132@psuvm.psu.edu writes: > In article <00670283123@elgamy.RAIDERNET.COM>, elg@elgamy.RAIDERNET.COM (Eric > Lee Green) says: > > >to hose it. Times when you've said things like, "Exec needs 2K stacks > >minimum per task" are perfect proof of that... Exec *DOES* need more stack > >than your program needs for its own purposes, but that's only because when > >task switch time comes around your task's registers, 68010/68020 processor > >state, etc., are shoved onto the local stack. That data has to be stored > >*SOMEWHERE*, and if it's not stored onto the stack, it'll have to be stored > >in the task control structure somewhere. And 2K is a gross overestimate. > > If you make ANY operating system calls at all, you'd be a fool to > allocate less than 4K for a stack. Otherwise you're gauarenteed to crash > under 2.0, 3.0, 4.0 or whatever C= comes up with. (This is just my > opinion, OK ?) I just wrote a program that did major OS work (device I/O for instance) and it worked with 1800 bytes stack. I developed it under 2.0 and there it only needed 512 bytes, but when I tried it under 1.3 I had to use more. So I don't feel like a fool, I feel that I have shaved the stack size, but not too closely. The OS needs some stack but the most weight is on the algorithms - my program didn't quicksort a large array. I'd needed tons of stack for that. (This is my OS's opiniin and it's OK!) > -- Dan Babcock -- Jesper Steen Moeller -- __ Jesper Steen Moller /// VOICE: +45 31 62 46 45 Maglemosevej 52 __ /// USENET: cbmehq!cbmdeo!jsmoller DK-2920 Charl \\\/// FIDONET: 2:231/84.45 Denmark \XX/