Path: utzoo!utgpu!jarvis.csri.toronto.edu!rutgers!cs.utexas.edu!uunet!cs.dal.ca!aucs!852026d From: 852026d@aucs.uucp (DAWD) Newsgroups: comp.os.xinu Subject: Stack allocation in PCXINU !!! Message-ID: <1990Mar6.183151.13848@aucs.uucp> Date: 6 Mar 90 18:31:51 GMT Reply-To: 852026d@aucs.UUCP (DAWD) Organization: School of Computer Science, Acadia Univ., Nova Scotia Lines: 21 It is mentioned in Comer/Fossum's book ,XINU P.C edition, that PCXINU allocates a stack area for each process, in a way that if more than one process starts, their stacks are allocated CONTIGUOUSLY upward. I found out that PCXINU does not allocate processes' stacks CONTIGUOUSLY, because when PCXINU creates a process it uses function getmem() to allocate it's stack , and function getmem() simply returns the first free block of memory from the free list. The following code will show it clearly : - ... resume(creat(process#2,......)); userblock = getmem(100); resume(creat(process#2,......)); .... Please post any comments . Thank You