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=-0.8 required=5.0 tests=BAYES_00,INVALID_DATE, MSGID_SHORT autolearn=no autolearn_force=no version=3.4.4 Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: 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 Keywords: validated compiler doesn't implement required pragma List-Id: 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