Path: utzoo!mnetor!uunet!husc6!think!ames!ucbcad!pasteur!ucbvax!CORY.BERKELEY.EDU!dillon From: dillon@CORY.BERKELEY.EDU (Matt Dillon) Newsgroups: comp.sys.amiga Subject: Re: SetStack Message-ID: <8801202127.AA10280@cory.Berkeley.EDU> Date: 20 Jan 88 21:27:00 GMT Sender: daemon@ucbvax.BERKELEY.EDU Lines: 16 >; SetStack(newstack,size) >;FUNCTION >; This function points the current process' stack to a new memory >; location. The active part of the old stack is duplicated, so no >; context is lost. SetStack() also tickles the proper fields in the task >; structure to tell the system about the change. At this time it does >; not deallocate the old stack. You CAN'T deallocate the old stack, Because it will be deallocated by the parent task... For instance, my shell allocates the stack for the 'command', then deallocates after it is through. Also, the parent may depend on the task structure not changing, so it is probably better NOT to diddle the pointers... at least they should be the same on program exit. -Matt