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 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Thread: 103376,ae395e5c11de7bc9 X-Google-NewGroupId: yes X-Google-Attributes: gida07f3367d7,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news2.google.com!news3.google.com!feeder.news-service.com!188.40.43.213.MISMATCH!feeder.eternal-september.org!eternal-september.org!.POSTED!not-for-mail From: Charmed Snark Newsgroups: comp.lang.ada Subject: Re: segfault with large-ish array with GNAT Date: Fri, 19 Mar 2010 13:26:31 +0000 (UTC) Organization: The Snarky Insanitorium Message-ID: References: <642ddf8b-1d45-4f74-83ad-2c755040ca33@k24g2000pro.googlegroups.com> <4ba13454$0$6720$9b4e6d93@newsspool2.arcor-online.net> <6b9abbbd-2d5e-4e80-b353-fc4d1ccd2963@q23g2000yqd.googlegroups.com> Injection-Date: Fri, 19 Mar 2010 13:26:31 +0000 (UTC) Injection-Info: feeder.eternal-september.org; posting-host="9f8M0iN5t54V+4DF/iqO8g"; logging-data="31898"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+rAbNeRmT1Kg19c2mbcEprMFNp98WK5IQ=" User-Agent: Xnews/5.04.25 X-Face: &6@]C2>ZS=NM|HE-^zWuryN#Z/2_.s9E|G&~DRi|sav9{E}XQJb*\_>=a5"q]\%A;5}LKP][1mA{gZ,Q!j Cancel-Lock: sha1:h/xL2Nk+aqy33aUQrbMJ112Nkm4= Xref: g2news2.google.com comp.lang.ada:10637 Date: 2010-03-19T13:26:31+00:00 List-Id: Maciej Sobczak expounded in news:6b9abbbd-2d5e-4e80-b353-fc4d1ccd2963 @q23g2000yqd.googlegroups.com: > On 18 Mar, 18:03, Warren wrote: >> With the new focus on parallel cores etc., I've often pondered >> what a future CPU without a stack might look like. Imagine >> a CPU that somehow in microcode was able to do a fast-malloc >> of a stack frame > > There is no need to do that in microcode - the compiler decides what > does it mean to call a subprogram and what does it mean to allocate > the "frame", so you might simply have a compiler that implements these > concepts in terms of a dynamically allocated linked list. True enough.. > I vaguely remember reading about a C compiler that did exactly that a > while ago - but I fail to find it in Google due to the noise from > billions of tutorials with stacks and lists. :-) Interesting. Do you recall the time frame? Was it DOS era or post Win95? > Today you might find this idea implemented in just about any > *interpreter*. > Maciej Sobczak * www.inspirel.com Even interpreters use stacks. A basic interpreter needs to allocate a stack for each thread of control. However, as you say, it could be implemented differently as a linked list of "frames". Warren