From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,FREEMAIL_FROM autolearn=ham autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,984d3d7860d7c8c X-Google-Attributes: gid103376,public Path: g2news1.google.com!news1.google.com!news.glorb.com!news.moat.net!border1.nntp.sjc.giganews.com!nntp.giganews.com!local1.nntp.sjc.giganews.com!nntp.comcast.com!news.comcast.com.POSTED!not-for-mail NNTP-Posting-Date: Wed, 02 Jun 2004 23:34:01 -0500 Date: Thu, 03 Jun 2004 00:34:00 -0400 From: "Robert I. Eachus" User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.4) Gecko/20030624 Netscape/7.1 (ax) X-Accept-Language: en-us, en MIME-Version: 1.0 Newsgroups: comp.lang.ada Subject: Re: Where are returned values stored? References: <75s9b0pgo91ctvlm5op2rcql82t9ip4me2@4ax.com> <1dptc.49822$tb4.1731604@news20.bellglobal.com> <2hv1auFhi91aU1@uni-berlin.de> In-Reply-To: Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Message-ID: NNTP-Posting-Host: 24.147.90.114 X-Trace: sv3-yNDvOWyvu7CIDalLIfpJV2uhSGA3FUyBtwMWTXaDXF57FEUw3zePFzlVo8Fx4wiYrAkmWHKl/X3iJTN!LLIafcWmPkvJ+zRvADrGJNjYYUuhgU91Wk9WeQI2G4QMzjdMSssDF7UkSVHKZg== X-Complaints-To: abuse@comcast.net X-DMCA-Complaints-To: dmca@comcast.net X-Abuse-and-DMCA-Info: Please be sure to forward a copy of ALL headers X-Abuse-and-DMCA-Info: Otherwise we will be unable to process your complaint properly X-Postfilter: 1.1 Xref: g2news1.google.com comp.lang.ada:1052 Date: 2004-06-03T00:34:00-04:00 List-Id: Warren W. Gay VE3WWG wrote: > In a POSIX environment, this would be normally called a > "process" -- not a thread. But a quick perusal of > the word "thread" in technical dictionaries online, > seems to return an array of muddled definitions > for "thread". I often use process that way to. The choices seem to be light and heavyweight processes, light and heavy threads, or threads and proceses. For this discussion, I thought the emphasis should be on whether or not address space was shared, so I chose the terms I did. (There can also be scheduling differences between processes and threads, and that is irrelevant here.) > Anyway, I tend to live in the POSIX world, and so for > me at least, more stacks means carving up more of the > precious 2GB address space on 32 bit platforms. Once > everyone moves to 64 bit processors, then this is less > of a problem. I'm shopping for an Athlon64 right now, and exactly for this reason. ;-) >> But it usually suffices to materialize a minimum return stack if per >> task if and when it is referenced, and leave it unallocated otherwise. > > > Yes, of course. You must still however, carve up the > address space for the stacks, whether the vm pages are > allocated or not. Actually, no. There is one of those obvious in hindsight neat tricks. Don't allocate the address space for the stack and leave the pointer to the stack null/invalid. When the stack needs to be used, both the address space and physical space have to be allocated and can then be used. This helps a lot in Ada, where most tasks will never need or use the return stack. -- Robert I. Eachus "The terrorists rejoice in the killing of the innocent, and have promised similar violence against Americans, against all free peoples, and against any Muslims who reject their ideology of murder. Their barbarism cannot be appeased, and their hatred cannot be satisfied. There's only one way to deal with terror: We must confront the enemy and stay on the offensive until these killers are defeated." -- George W. Bush