🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: net.lang.ada
Article #991

pragmas, validation and garbage collection

#991
From: Arny B. Engelson
Date: Thu, 02 Oct 1986 13:37
30 lines
2226 bytes
   I am developing a program in which I need to control garbage collection
for certain data types.  Ada defines pragma Controlled and the generic
procedure Unchecked_Deallocation for doing this.  However, I was surprised
to find that my VALIDATED (on ACVC 1.7) compiler doesn't implement pragma
Controlled! Not only that, but it has an automatic garbage collection
algorithm that I can't seem to turn off.
   According to LRM 2.8:8  "The pragmas defined by the language ... must be
supported by every implementation."  Since pragma Controlled is defined by
the language, how did this compiler get validated without implementing it?
Or can "supporting" this requirement be met through providing some other
mechanism other than pragma Controlled? (Not that I found any other mechanism).
BTW, Unchecked_Deallocation is implemented.
   Are there other validated compilers that don't implement "required" pragmas?
Do the ACVC tests check for this?

   The reason for all this is I have pointers to different data types which I
convert to integer addresses so I can store them all in one queue. The original
pointers get destroyed (unavoidable), and I convert the saved addresses back to
typed pointers to access the data.  Unfortunately, since there are no pointers
to the data while it is on the queue, the garbage collector may free the memory
before I retrieve the data.
   There is way too much data to attempt to keep dummy pointers to fool the
garbage collector or to create duplicate queues for each data type.  Also, I
have to be able to support an unknown number of different types at once.

   Alas, another great idea is thwarted by reality.

Arny Engelson
...bonnie!wayback!arny
Technical Details
Message-ID: <980@wayback.UUCP>
Path: arc1-ca.pugleaf.net!utzoo!watmath!clyde!wayback!arny

Show Full Headers
Complete Article Headers
Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP
Path: arc1-ca.pugleaf.net!utzoo!watmath!clyde!wayback!arny
From: arny@wayback.UUCP (Arny B. Engelson)
Newsgroups: net.lang.ada
Subject: pragmas, validation and garbage collection
Message-ID: <980@wayback.UUCP>
Date: Thu, 2-Oct-86 09:37:09 EDT
Article-I.D.: wayback.980
Posted: Thu Oct  2 09:37:09 1986
Date-Received: Sat, 4-Oct-86 08:45:05 EDT
Organization: AT&T Bell Labs, Whippany, NJ
Lines: 30
Keywords: validated compiler doesn't implement required pragma