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!newsfeed2.dallas1.level3.net!news.level3.com!newsfeed-00.mathworks.com!nntp.TheWorld.com!not-for-mail From: Robert A Duff Newsgroups: comp.lang.ada Subject: Re: Large arrays (again), problem case for GNAT Date: 13 Apr 2005 20:16:21 -0400 Organization: The World Public Access UNIX, Brookline, MA Message-ID: References: NNTP-Posting-Host: shell01.theworld.com Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: pcls4.std.com 1113437781 30371 192.74.137.71 (14 Apr 2005 00:16:21 GMT) X-Complaints-To: abuse@TheWorld.com NNTP-Posting-Date: Thu, 14 Apr 2005 00:16:21 +0000 (UTC) User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.2 Xref: g2news1.google.com comp.lang.ada:10443 Date: 2005-04-13T20:16:21-04:00 List-Id: "(see below)" writes: > I see that Adrian is using Linux. > Is Linux not notorious for problems of this kind? > > I seem to remember that it has some kind of optimistic allocator > that can grant a memory allocation request, only for it to fail > when you try to use the memory you appear to have been granted. Hmm. If the OS allocates virtual address space for that giant array, but doesn't allocate physical memory, or backing store, for it, then an access to that array could allocate memory, thus causing Storage_Error. That would be legitimate behavior on the part of the Ada compiler. Maybe Adrian should try increasing the size of the paging file? But there's a loop writing 0.0 over the whole thing, so I would guess *that* would actually allocate the memory. Also, the above doesn't explain why the 'Address attribute returns strange results. I'm not sure why you say "notorious". It seems to me that allocate-on-write is desirable. - Bob