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.9 required=5.0 tests=BAYES_00 autolearn=unavailable autolearn_force=no version=3.4.4 Path: eternal-september.org!reader01.eternal-september.org!reader02.eternal-september.org!feeder.eternal-september.org!gandalf.srv.welterde.de!news.jacob-sparre.dk!franka.jacob-sparre.dk!pnx.dk!.POSTED.rrsoftware.com!not-for-mail From: "Randy Brukardt" Newsgroups: comp.lang.ada Subject: Re: How to get Ada to ?cross the chasm?? Date: Mon, 7 May 2018 18:54:24 -0500 Organization: JSA Research & Innovation Message-ID: References: <1c73f159-eae4-4ae7-a348-03964b007197@googlegroups.com> <87in88m43h.fsf@nightsong.com><87efiuope8.fsf@nightsong.com> <87lgd1heva.fsf@nightsong.com> <87zi1gz3kl.fsf@nightsong.com> <878t8x7k1j.fsf@nightsong.com> <87k1sg2qux.fsf@nightsong.com> <87h8njmk4r.fsf@nightsong.com> <87po27fbv9.fsf@nightsong.com> Injection-Date: Mon, 7 May 2018 23:54:26 -0000 (UTC) Injection-Info: franka.jacob-sparre.dk; posting-host="rrsoftware.com:24.196.82.226"; logging-data="4384"; mail-complaints-to="news@jacob-sparre.dk" X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2900.5931 X-RFC2646: Format=Flowed; Original X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.7246 Xref: reader02.eternal-september.org comp.lang.ada:52078 Date: 2018-05-07T18:54:24-05:00 List-Id: "Paul Rubin" wrote in message news:87po27fbv9.fsf@nightsong.com... ... > I'd add as well: most refcount systems I know of don't move objects > around in memory, so you get memory fragmentation and high cache miss > rates. GC systems typically compact the heap when the GC runs, ... That would be extreme hard to do with Ada, since you'd have to avoid moving anything that is "pinned" by a representation clause, anything that uses 'Address (unless you are prepared to follow that into all possible places), and anything imported/exported. You'd also have to be prepared to adjust 'Access/'Unchecked_Access of aliased components. Sounds like a nightmare. Similarly, figuring out what is reachable sounds like a nightmare, with local access objects of various kinds, access objects that point to stack objects, access values that come from foreign languages (i.e. C), and various tasking issues. And of course the finalization issue mentioned before. One could probably implement GC that worked for some subset of objects, but for the full language that seems both difficult and worthless (the latter because finalizing early is not allowed, so you could really only collect objects with trivial finalization). Randy.