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,ccec7cf654f5e8c3 X-Google-Attributes: gid103376,public X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!news4.google.com!news.glorb.com!border1.nntp.dca.giganews.com!nntp.giganews.com!local01.nntp.dca.giganews.com!nntp.comcast.com!news.comcast.com.POSTED!not-for-mail NNTP-Posting-Date: Mon, 09 May 2005 00:47:05 -0500 From: tmoran@acm.org Newsgroups: comp.lang.ada Subject: Re: creating database References: X-Newsreader: Tom's custom newsreader Message-ID: <9cKdnRAx8IfEZOPfRVn-pg@comcast.com> Date: Mon, 09 May 2005 00:47:05 -0500 NNTP-Posting-Host: 24.6.127.15 X-Trace: sv3-1iczQpCKWU1ViHRwms/fSWw5SklVkCO3hGEdJMQkXjhEOOSmYNK+uiI4mN+VXhaudPp0tSBwqRy1cLR!9+/LtXEd8OEIIUKOkl0nbT00abcS3fn7EwqGln2CM/NjNhX1lHpW/bgdnQ0= X-Complaints-To: abuse@comcast.net X-DMCA-Complaints-To: dmca@comcast.net X-Abuse-and-DMCA-Info: Please be sure to forward a copy of ALL headers X-Abuse-and-DMCA-Info: Otherwise we will be unable to process your complaint properly X-Postfilter: 1.3.31 Xref: g2news1.google.com comp.lang.ada:10961 Date: 2005-05-09T00:47:05-05:00 List-Id: > > don't know how many records there'll be so it seems inefficient to > > declare an array of a particular size. > > Sensible thinking. > ... > Instead of allocating a fixed size array - which on unix systems isn't > quite as bad an idea as it sounds - you can allocate and reallocate A fixed array allocation may be the both the most efficient and the simplest on a virtual memory system. The parts you don't use don't occupy any physical space, just address space, and the OS's allocation of physical space may well be difficult to beat in efficiency.