While PL/I F did a GETMAIN for every DSA, no subsequent compiler did. Starting with Version 1 Release 1, the runtime library for the "optimizing" and checkout compiler did a GETMAIN for an ISA and as long as it was large enough, subsequent calls used it as a stack. Only when a DSA didn't fit was there a GETMAIN for an additional stack segment. Exiting a block adjusted the stack but did not do a FREEMAIN of unused stack segments.
The net result was to save time at the expense of storage; unless you were storage constrain, it was a btter approach. ________________________________________ From: IBM Mainframe Discussion List <IBM-MAIN@LISTSERV.UA.EDU> on behalf of Bernd Oppolzer <bernd.oppol...@t-online.de> Sent: Wednesday, September 6, 2023 11:13 PM To: IBM-MAIN@LISTSERV.UA.EDU Subject: Re: Simple request from chatGPT to write assembler program. Am 07.09.2023 um 01:40 schrieb Leonard D Woren: > Michael Stein wrote on 9/6/2023 3:45 PM: >> [...] PL/1 F level subroutine calls did a getmain/freemain for each >> subroutine call. Too much overhead to call even one subroutine for >> each of 30K records on a 360/91 & MVT. > > Well, my recollection is that if you had only Static storage, no > Automatic storage, it didn't do a GETMAIN. > Or was that an enhancement in the new PL/I compiler? Was that PLIX? > Yeah, not using stuff for decades can cause memory fade. > > > /Leonard > I first came into contact with PL/1 in the end of the 1980s at the beforementionend insurance company. At that time, they had the V2.3 optimizer (IIRC), and it produced pretty amazing code. I was asked to do PL/1 classes for the developers there. This company made (and still makes) heavy use of automatic storage and tried to code all modules "naturally reentrant", that is: no modified static storage. So the problems with getmain/freemain at procedure startup and end must have been long gone. That company started with PL/1 in the beginning of the 1980s, before that is was an ASSEMBLER only shop. (C came later, from 1992 on). 1992 (and 1994 again) I was asked to do a dump analysis class in another PL/1 company. They indeed had DEFEAULT RANGE(*) STATIC; in almost every program. I didn't understand the reason at that time and thought is was for dump reading, because static variable (in the STATIC CSECT which is part of the load module) are much easier to find than auto variables (living in the stack). But now I have the impression that this could have simply been a performance issue in the beginning. Kind regards Bernd ---------------------------------------------------------------------- For IBM-MAIN subscribe / signoff / archive access instructions, send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN ---------------------------------------------------------------------- For IBM-MAIN subscribe / signoff / archive access instructions, send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN