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,86ec22e070e319c0 X-Google-Attributes: gid103376,public From: stt@houdini.camb.inmet.com (Tucker Taft) Subject: Re: How do I get this to work?? Date: 1999/01/18 Message-ID: #1/1 X-Deja-AN: 434039025 Sender: news@inmet.camb.inmet.com (USENET news) X-Nntp-Posting-Host: houdini.camb.inmet.com References: <77vi4q$o7l$1@nnrp1.dejanews.com> Organization: Intermetrics, Inc. Newsgroups: comp.lang.ada Date: 1999-01-18T00:00:00+00:00 List-Id: robert_dewar@my-dejanews.com wrote: : In article , : warwicks@telusplanet.net (Chris Warwick) wrote: : > Of all the Ada compilers I have dealt with, both 83 and : > 95, none deallocate memory to my knowledge (GNAT may, but : > I haven't had need to look). Indeed this is one of the : > first questions I ask when I discover c++ programmers : > using Ada... : You need to cite chapter and verse here. I have worked with : many many Ada compilers, and none of them ignored unchecked : deallocation, and it is hard to imagine that any would. : Of course GNAT deallocates memory, but I would never claim : this is a special advantage of GNAT, since all Ada : compilers deallocate memory. : The only instance I know of in commercial Ada compilers : which might give rise to such a peculiar claim is the : old obsolete Alsys 386 compiler, which for local : collections (not very common in practice) delayed the : deallocation till scope exit, but even there to say that : the memory was not deallocated is false. : Just what *are* you talking about here. I have often heard : misinformation about Ada spread, but this is among the : most extraordinary examples! I can imagine that perhaps Chris Warwick meant that Unchecked_Deallocation recycles storage for use by later allocators, but never returns it to the operating system. This does not surprise me, because the total memory required by a program, even with perfect reclamation, rarely goes down over time, so giving memory back to the operating system temporarily seems like an expensive thing to do for little potential payoff. Chris, is that what you meant? If so, I am curious what sort of application system requires this behavior. For what it is worth, there are a number of Ada 95 compilers (e.g. on VxWorks and Windows NT) which directly connect to the underlying operating system malloc/free when the user uses allocators/unchecked-deallocation. I suppose these "operating system" malloc/frees might recycle storage to other concurrently running processes, though I don't know for sure. -- -Tucker Taft stt@averstar.com http://www.averstar.com/~stt/ Technical Director, Distributed IT Solutions (www.averstar.com/tools) AverStar (formerly Intermetrics, Inc.) Burlington, MA USA