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,be7fa91648ac3f12 X-Google-Attributes: gid103376,public X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!news4.google.com!news2.google.com!proxad.net!proxad.net!194.117.148.138.MISMATCH!pe2.news.blueyonder.co.uk!blueyonder!pe1.news.blueyonder.co.uk!blueyonder!news-out.ntli.net!newsrout1-gui.ntli.net!ntli.net!newspeer1-win.ntli.net!newsfe1-win.ntli.net.POSTED!53ab2750!not-for-mail From: "Dr. Adrian Wrigley" Subject: Re: Large arrays (again), problem case for GNAT User-Agent: Pan/0.14.2 (This is not a psychotic episode. It's a cleansing moment of clarity.) Message-Id: Newsgroups: comp.lang.ada References: <1113464720.9829.20.camel@localhost.localdomain> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit Date: Thu, 14 Apr 2005 14:09:43 GMT NNTP-Posting-Host: 81.100.88.147 X-Complaints-To: http://www.ntlworld.com/netreport X-Trace: newsfe1-win.ntli.net 1113487783 81.100.88.147 (Thu, 14 Apr 2005 15:09:43 BST) NNTP-Posting-Date: Thu, 14 Apr 2005 15:09:43 BST Organization: ntl Cablemodem News Service Xref: g2news1.google.com comp.lang.ada:10457 Date: 2005-04-14T14:09:43+00:00 List-Id: On Thu, 14 Apr 2005 14:59:01 +0100, Marius Amado Alves wrote: > > On 14 Apr 2005, at 08:45, Duncan Sands wrote: > >> The reason for doing it is pragmatic: many programs allocate memory >> that >> they never use.... > > This problem seems easy to solve then. Just allocate and immediately > write some stuff to the start and end of the block. You need to write something to *every* machine page to make sure real memory is allocated. If there isn't enough memory, you probably can't do anything about it (can you trap this at all?). But at least it fails early, rather than at a random point much later. -- Adrian