🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.lang.fortran
Article #134

Re: “The end of software secrecy is almost upon

#134
From: Steven G. Kargl
Date: Thu, 22 Oct 2026 07:31
60 lines
3944 bytes
On Thu, 22 Oct 2026 14:34:20 +0800, Johann 'Myrkraverk' Oskarsson wrote:

> On 10/22/2026 12:56 PM, Steven G. Kargl wrote:
>> On Thu, 22 Oct 2026 04:50:10 -0000 (UTC), Lawrence D’Oliveiro wrote:
>> 
>>> On Thu, 22 Oct 2026 04:33:04 -0000 (UTC), Steven G. Kargl wrote:
>>>
>>>>>>
>>>>>> Sure, what is the EXACT clean up that you envision?
>>>>>
>>>>> “Storage allocations”.
>>>>
>>>> There isn't any "storage allocation" to cleanup.
>>>
>>> Not in your example. Which is why it was irrelevant.
>> 
>> Then give a Fortran 77 example that requires cleanup.
>> You can't, can you?
>> 
>> Using GOTO to jump out of do-loop in Fortran 77 does
>> not lead to some mysterious "storage allocation" to
>> cleanup.
>> 
>> PS: a smart compiler would actually not generate code
>> to execute the do-loop for the code in my example.
>> 
> 
> Open Watcom Fortran 77 has /allocate/ and /deallocate/ according to a
> quick glance at the manual, but I have never used them.

Dynamic memory management via allocate/deallocate was introduce
in Fortran 90.  Open Watcom Fortran 77 may have added those as
an extension.  The Fortran 77 standard does have a dynamic memory
feature.  But, this seems irrelevant to Lawrence, who has coined
the term "storage allocation", which is not Fortran terminology.
We are now waiting for a definition for this term.

> I guess the point is we don't want to allocate in a loop?

I allocate memory in do-loops all time.  It would be a significant
pessimization to write something like

   integer, allocatable :: i(:)
   i = [0]               ! A 1-element array.
   do j = 1, 9
     i = [i,j]           ! Re-allocate i on assignment
   end do
10 print *, i
   end

Note, there is no clean up of 'storage allocation' when the
loop terminates.  The Fortran standard does not mandate when
memory that may have been freed during the re-allocation is
actually garbaged collected.  The program could return memory
to the system during the re-allocation or when the program
terminates.

-- 
steve
Technical Details
Message-ID: <11bce53$k9ji$1@dont-email.me>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!eternal-september.org!feeder.eternal-september.org!nntp.eternal-september.org!.POSTED!not-for-mail
References: <11amvre$15far$1@dont-email.me> <11b5tdb$2cs5l$1@dont-email.me> <11b64cp$end$1@panix2.panix.com> <11b64hj$2faos$1@dont-email.me> <11b679m$6dl$1@panix2.panix.com> <11b6vc4$2npqv$1@dont-email.me> <11b87jg$37b7t$1@dont-email.me> <11b884b$p2o9$1@dont-email.me> <11b94he$3hdo3$2@dont-email.me> <11b9qd6$pq4i$1@dont-email.me> <11b9r5r$3nppf$1@dont-email.me> <11baekk$3v7n1$1@dont-email.me> <11bbl4f$du80$2@dont-email.me> <11bbo58$ek3q$1@dont-email.me> <11bbqns$fe31$1@dont-email.me> <11bbron$fmi2$1@dont-email.me> <11bc09b$gsv1$1@dont-email.me> <11bc3m0$hnan$1@dont-email.me> <11bc4m2$i1rd$1@dont-email.me> <11bc516$i37l$1@dont-email.me> <O7iCS.3141$K1P4.1508@fx14.ams4>

Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!eternal-september.org!feeder.eternal-september.org!nntp.eternal-september.org!.POSTED!not-for-mail
From: "Steven G. Kargl" <sgk@REMOVEtroutmask.apl.washington.edu>
Newsgroups: comp.lang.fortran,comp.lang.c++,alt.comp.lang.rust,alt.folklore.computers
Subject: Re: “The end of software secrecy is almost upon
Date: Thu, 22 Oct 2026 07:31:48 -0000 (UTC)
Organization: A noiseless patient Spider
Lines: 60
Message-ID: <11bce53$k9ji$1@dont-email.me>
References: <11amvre$15far$1@dont-email.me> <11b5tdb$2cs5l$1@dont-email.me>
	<11b64cp$end$1@panix2.panix.com> <11b64hj$2faos$1@dont-email.me>
	<11b679m$6dl$1@panix2.panix.com> <11b6vc4$2npqv$1@dont-email.me>
	<11b87jg$37b7t$1@dont-email.me> <11b884b$p2o9$1@dont-email.me>
	<11b94he$3hdo3$2@dont-email.me> <11b9qd6$pq4i$1@dont-email.me>
	<11b9r5r$3nppf$1@dont-email.me> <11baekk$3v7n1$1@dont-email.me>
	<11bbl4f$du80$2@dont-email.me> <11bbo58$ek3q$1@dont-email.me>
	<11bbqns$fe31$1@dont-email.me> <11bbron$fmi2$1@dont-email.me>
	<11bc09b$gsv1$1@dont-email.me> <11bc3m0$hnan$1@dont-email.me>
	<11bc4m2$i1rd$1@dont-email.me> <11bc516$i37l$1@dont-email.me>
	<O7iCS.3141$K1P4.1508@fx14.ams4>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Injection-Date: Thu, 22 Oct 2026 07:31:48 +0000 (UTC)
Injection-Info: dont-email.me;
	logging-data="665202"; mail-complaints-to="abuse@eternal-september.org";	posting-account="U2FsdGVkX18TuGdbNTSCmogQHYxFULee"; posting-host="514a61cf29d3a2954ea16debb35119cd"
User-Agent: Pan/0.164 (Kupiansk)
Cancel-Lock: sha1:IJQG9JzfzhpDciUn4xcVRNmk85o= sha256:tmpqfuy8xobPhR3od+9d03lnMfNlBmuMCQc6gBnS9z8=
	sha1:SZLKYDfCH7JDPCsYgBypxfxkpO4= sha256:YYQHsgt2Kng7Am9F/hQa51Kb6jcS4h76NANDAkzg84s=