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=ham autolearn_force=no version=3.4.4 X-Google-Thread: 103376,f31af493775a063b X-Google-Attributes: gid103376,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!news2.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!newsfeed00.sul.t-online.de!t-online.de!news.karotte.org!news2.arglkargh.de!nuzba.szn.dk!news.jacob-sparre.dk!pnx.dk!not-for-mail From: Jacob Sparre Andersen Newsgroups: comp.lang.ada Subject: Re: Question about arrays and no. of elements Date: Sat, 17 May 2008 18:32:58 +0200 Organization: Jacob's private Usenet server Message-ID: References: NNTP-Posting-Host: taasingegade.news.jacob-sparre.dk Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: jacob-sparre.dk 1211041978 21725 85.82.239.166 (17 May 2008 16:32:58 GMT) X-Complaints-To: news@jacob-sparre.dk NNTP-Posting-Date: Sat, 17 May 2008 16:32:58 +0000 (UTC) User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.1 (gnu/linux) Cancel-Lock: sha1:nnr9hedApDkNUerKRubGlnKK2Zk= Xref: g2news1.google.com comp.lang.ada:163 Date: 2008-05-17T18:32:58+02:00 List-Id: amal.alphonse@gmail.com writes: > If I define an array with say a million elements, and I only put > data in 10 of them, is it actually a waste of space/time with the > array or does Ada only create elements when there is data to put in > (so it is efficient)? With GNAT on Linux, you will only use memory for the part of the array you put something into (modulo the page size - which I think is 4 kb). Greetings, Jacob -- The backhoe is the natural predator of the fiber optic cable.