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.7 required=5.0 tests=BAYES_00,INVALID_DATE, REPLYTO_WITHOUT_TO_CC autolearn=no autolearn_force=no version=3.4.4 Path: utzoo!utgpu!watmath!clyde!att!osu-cis!tut.cis.ohio-state.edu!mailrus!ames!killer!pollux!ti-csl!m2!gateley From: gateley@m2.csc.ti.com (John Gateley) Newsgroups: comp.lang.ada Subject: Re: Garbage Collection Message-ID: <65914@ti-csl.CSNET> Date: 19 Dec 88 16:12:39 GMT References: <65713@ti-csl.CSNET> <3918@hubcap.UUCP> Sender: news@ti-csl.CSNET Reply-To: gateley@m2.UUCP (John Gateley) Organization: TI Computer Science Center, Dallas List-Id: In article <3918@hubcap.UUCP> billwolf@hubcap.clemson.edu writes: >>From article <65713@ti-csl.CSNET>, by gateley@m2.csc.ti.com (John Gateley): >> [I say infinite precision arithmetic is a good example of why GC is needed >> sometimes]. > > The deallocation of every object in the local environment is > performed as an automatic service when a procedure, function, > or local block is exited. This is not garbage collection, > because the programmer has implicitly directed that the > destruction be performed. But, integers are not always deallocated. They may be returned as the result of a function, assigned to global variables, placed in the heap as parts of other data objects etc. When you try and do the same with infinite precision integers, then the deallocation you describe does not work! You can always copy them for these purposes, but this can be very space/time inefficient. It also requires extra effort (remembering to copy them), unless Ada provides some technique for doing this automatically. So, GC is a good way to handle this problem. > Unfortunately, Ada does not provide a means of integrating ADT > destruction algorithms into the mechanism providing this service. > This is Language Issue 35 of the Ada Language Issues Working Group; > ... Integers, however, are not deallocated when a block is exited (if they have been saved elsewhere). So, I don't think this language issue applies to the infinite precision integer case. John gateley@tilde.csc.ti.com