Warning: mysqli::__construct(): (HY000/1203): User howardkn already has more than 'max_user_connections' active connections in D:\Inetpub\vhosts\howardknight.net\al.howardknight.net\includes\artfuncs.php on line 21
Failed to connect to MySQL: (1203) User howardkn already has more than 'max_user_connections' active connections
Warning: mysqli::query(): Couldn't fetch mysqli in D:\Inetpub\vhosts\howardknight.net\al.howardknight.net\index.php on line 66
Article <vdnol1$255q$1@gal.iecc.com>
Deutsch   English   Français   Italiano  
<vdnol1$255q$1@gal.iecc.com>

View for Bookmarking (what is this?)
Look up another Usenet article

Path: ...!news.iecc.com!.POSTED.news.iecc.com!not-for-mail
From: John Levine <johnl@taugh.com>
Newsgroups: alt.folklore.computers,comp.os.linux.misc
Subject: Re: stacks are not hard, The joy of FORTRAN-like languages
Date: Fri, 4 Oct 2024 03:49:53 -0000 (UTC)
Organization: Taughannock Networks
Message-ID: <vdnol1$255q$1@gal.iecc.com>
References: <pan$96411$d204da43$cc34bb91$1fe98651@linux.rocks> <vdantp$1knbl$1@dont-email.me> <3XqKO.347651$WOde.64018@fx09.iad> <1780944966.749420156.476631.peter_flass-yahoo.com@news.eternal-september.org>
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit
Injection-Date: Fri, 4 Oct 2024 03:49:53 -0000 (UTC)
Injection-Info: gal.iecc.com; posting-host="news.iecc.com:2001:470:1f07:1126:0:676f:7373:6970";
	logging-data="70842"; mail-complaints-to="abuse@iecc.com"
In-Reply-To: <pan$96411$d204da43$cc34bb91$1fe98651@linux.rocks> <vdantp$1knbl$1@dont-email.me> <3XqKO.347651$WOde.64018@fx09.iad> <1780944966.749420156.476631.peter_flass-yahoo.com@news.eternal-september.org>
Cleverness: some
X-Newsreader: trn 4.0-test77 (Sep 1, 2010)
Originator: johnl@iecc.com (John Levine)
Bytes: 2911
Lines: 31

According to Peter Flass  <peter_flass@yahoo.com>:
>> The subroutine calling convention required the calling program
>> to pass a pointer to a register save area.  A recursive routine
>> would have to allocate a save area in each instance (and, of
>> course, free it before exiting).  If they wanted local variables,
>> they'd have to allocate and free them as well.
>
>Presumably local variables would be allocated together with the save area.
>All the assembler code I wrote used GETMAIN/FREEMAIN, then I had a
>head-slapping moment a few years ago when someone said “just allocate a big
>chunk of memory and allocate save areas from it to eliminate lots of SVCs.”
>Of course this only makes sense when your assembler code has lots of
>internal calls, not for small stand-alone subroutines.

That's essentially what PL/I did.  The save areas and local variables were
allocated from a big chunk of memory, and when it ran out, the subroutine
prolog called an internal PL/I routine to get a new chunk and chain them
together.  Read all about it here starting on page 158:

https://bitsavers.org/pdf/ibm/360/pli/C28-6594-4_PL1_F_Programmers_Guide_Nov68.pdf

And for the PL/I subset on the tiny 360/20, it starts on page 200:

https://bitsavers.org/pdf/ibm/360/model20/C33-6007-1_360-20_PLI_Dec68.pdf

I hear that Algol F did GETMAIN/FREEMAIN at every block or procedure
entry and exit.  Someone at Princeton hacked it to suballocate from
larger chunks and vastly improved runtime performance.
-- 
Regards,
John Levine, johnl@taugh.com, Primary Perpetrator of "The Internet for Dummies",
Please consider the environment before reading this e-mail. https://jl.ly