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,d02eb5c33ac65d9 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2003-03-09 05:34:48 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!logbridge.uoregon.edu!arclight.uoregon.edu!wn13feed!wn12feed!worldnet.att.net!207.217.77.102!newsfeed2.earthlink.net!newsfeed1.earthlink.net!newsfeed.earthlink.net!stamper.news.pas.earthlink.net!stamper.news.atl.earthlink.net!harp.news.atl.earthlink.net!not-for-mail From: "Marin David Condic" Newsgroups: comp.lang.ada Subject: Re: Array and memory usage Date: Sun, 9 Mar 2003 08:34:40 -0500 Organization: MindSpring Enterprises Message-ID: References: <2397C8D4BA396B7A.ADB0E590CE8E5EAE.1C7AEC9AFCA7BE12@lp.airnews.net> NNTP-Posting-Host: d1.56.b9.5e X-Server-Date: 9 Mar 2003 13:34:47 GMT X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 5.00.2314.1300 X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2314.1300 Xref: archiver1.google.com comp.lang.ada:35089 Date: 2003-03-09T13:34:47+00:00 List-Id: Note that it is *probably* generating code that will initialize the objects as they are created. It is probably also not the most efficient way that the initialization could be done, either. I've seen major problems with embedded code where we've wanted to initialize global RAM data and couldn't get static initialization of it using the usual Ada mechanisms. I've also seen where initialization of the type would generate code to initialize each field of the record with function calls but initialization of the object with an aggregate would result in a simple memory move of the whole thing. If you care about code size and efficiency, you can find a number of "surprises" and "gotchas" with Ada. MDC -- ====================================================================== Marin David Condic I work for: http://www.belcan.com/ My project is: http://www.jsf.mil/ Send Replies To: m c o n d i c @ a c m . o r g "Going cold turkey isn't as delicious as it sounds." -- H. Simpson ====================================================================== Preben Randhol wrote in message news:slrnb6mbnv.8a1.randhol+news@kiuk0152.chembio.ntnu.no... > > Ok but I also have a : > > User_Db : User_Data; > > And if I use the first User_Data type then the memory usage only increases as > I add Names and Hostnames. I mean it doesn't go from 800 to 2356 as I > add one name, but slowly until all Names are added. This puzzeles me.