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=-1.3 required=5.0 tests=BAYES_00,INVALID_MSGID autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,a77baf86c187076a X-Google-Attributes: gid103376,public From: "Brian R. Hanson" Subject: Re: Garbage collection (was a spinoff of a spinoff of a GA diatribe) Date: 1996/10/25 Message-ID: <3270DCE3.59E2@cray.com>#1/1 X-Deja-AN: 191999683 references: <9610211427.AA06636@most> content-type: text/plain; charset=us-ascii organization: Cray Research a division of Silicon Graphics, Inc. mime-version: 1.0 newsgroups: comp.lang.ada x-mailer: Mozilla 3.0SC-SGI (X11; I; IRIX 6.2 IP22) Date: 1996-10-25T00:00:00+00:00 List-Id: Robert I. Eachus wrote: > The finalization routine took five lines, and neat trick was in the > Adjust routine. On assignment, a node (and all the nodes reached from > it) was given a new generation number (always incremented), positive > for the node assigned, and negated for all nodes reachable from it. > From a garbage collection point of view it was "extra overhead" but it > allowed me to do other operations such as reachability more > efficiently. (You can't reach a node with a lower absolute generation > number. The biggest win is that you only have to check against nodes > you have visited before with the current generation number. Beats > marking and unmarking and allows more than one such operation to be > conducted simultaneously.) Have you read the paper on "The GNAT Implementation of controlled types"? After looking at this one could argue that GC could easily more efficient if you could avoid using controlled types. -- Brian Hanson -- brh@cray.com