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.4 required=5.0 tests=AC_FROM_MANY_DOTS,BAYES_00 autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,345a8b767542016e X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2002-03-15 20:06:41 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!newsfeed.icl.net!dispose.news.demon.net!demon!news-x2.support.nl!newsfeed.freenet.de!lon1-news.nildram.net!154.32.99.10.MISMATCH!psiuk-p2!psiuk-p3!uknet!psiuk-n!news.pace.co.uk!nh.pace.co.uk!not-for-mail From: "Marin David Condic" Newsgroups: comp.lang.ada Subject: Re: memory leakages with Ada? Date: Fri, 15 Mar 2002 13:00:23 -0500 Organization: Posted on a server owned by Pace Micro Technology plc Message-ID: References: <3c90af1e@news.starhub.net.sg> NNTP-Posting-Host: dhcp-200-133.miami.pace.co.uk X-Trace: nh.pace.co.uk 1016215225 12111 136.170.200.133 (15 Mar 2002 18:00:25 GMT) X-Complaints-To: newsmaster@news.cam.pace.co.uk NNTP-Posting-Date: 15 Mar 2002 18:00:25 GMT X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 5.50.4522.1200 X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4522.1200 Xref: archiver1.google.com comp.lang.ada:21318 Date: 2002-03-15T18:00:25+00:00 List-Id: Never said that. Please re-read my prior post and note that I made mention of using dynamic allocation in linked data structures. Sure, when you build a workstation app that deals with some collection of data that varies considerably, you'd put it into a linked list or a map or a tree or whatever that you build from dynamic memory. But generally that limits the creation & destruction of memory chunks to some limited portion of the code - hopefully a library that you are reusing over and over so it has become reliable with respect to not losing memory. What you typically don't do in Ada that gets done over and over again in C is to dynamically allocate memory every time you need a variable sized string or record that you want to pass around to subprograms. Nor do you typically build libraries that create dynamic data for the caller that the caller is responsible for deallocating. Nor do you typically create pointers to everything in sight to hand off to different parts of a program because parameter passing, function returns, scope/visibility rules, etc. decrease the need to be handing out the address of something to everyone who thinks they want it. Of course Ada programs *do* dynamically allocate memory, but it just isn't as common as it is in C. Hence leaks are less likely. MDC -- Marin David Condic Senior Software Engineer Pace Micro Technology Americas www.pacemicro.com Enabling the digital revolution e-Mail: marin.condic@pacemicro.com Web: http://www.mcondic.com/ "Kevin Cline" wrote in message news:dcfe911f.0203150941.5ebbb85b@posting.google.com... > > So dynamic memory allocation is no problem in Ada because "we just don't > do that?" That's fine for embedded applications, but the users of desktop > applications expect them to consume memory proprotional to the data > set size. They aren't too happy with messages like "sorry, file too large, > please increase DATA_FILE.MAX_SIZE and recompile."