comp.lang.ada
 help / color / mirror / Atom feed
From: mheaney@on2.com (Matthew Heaney)
Subject: Re: Array and memory usage
Date: 11 Mar 2003 08:01:52 -0800
Date: 2003-03-11T16:01:52+00:00	[thread overview]
Message-ID: <1ec946d1.0303110801.3c471b8c@posting.google.com> (raw)
In-Reply-To: wccfzpuajbg.fsf@shell01.TheWorld.com

Robert A Duff <bobduff@shell01.TheWorld.com> wrote in message news:<wccfzpuajbg.fsf@shell01.TheWorld.com>...
> 
> I thought it happened automatically.  That is, if I say:
> 
>     X: array (1..100_000_000) of Integer;
> 
> it would allocate 400,000,000 bytes of virtual memory, but only allocate
> physical pages on demand.  I believe that much works on Windows (without
> calling windows-specific stuff like SEH).  (Windows 2000, Windows XP.)
> The problem I found was that it allocated 400,000,000 bytes of backing
> store, which was annoying.
> 
> Am I misinformed?

Windows is going to commit all that memory up front, which (as Randy
pointed out) will indeed allocate backing store.

The solution is to "reserve" that range of virtual memory, without
actually "committing" the pages (to physical memory).  Then use SEH to
"commit" the pages as necessary, when a page fault occurs.



  parent reply	other threads:[~2003-03-11 16:01 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-03-09 11:19 Array and memory usage Preben Randhol
2003-03-09 11:52 ` John R. Strohm
2003-03-09 12:11   ` Preben Randhol
2003-03-09 13:34     ` Marin David Condic
2003-03-09 15:05       ` Preben Randhol
2003-03-10  1:45       ` Mark Biggar
2003-03-10 11:57         ` Marin David Condic
2003-03-10 12:06           ` Jeffrey Creem
2003-03-09 17:49     ` Robert A Duff
2003-03-09 17:04 ` Jeffrey Creem
2003-03-09 17:09   ` Preben Randhol
2003-03-09 18:10 ` Robert A Duff
2003-03-10 15:13   ` Matthew Heaney
2003-03-10 23:33     ` Robert A Duff
2003-03-11  0:40       ` Randy Brukardt
2003-03-11 23:37         ` Robert A Duff
2003-03-12 19:18           ` Randy Brukardt
2003-03-11 16:01       ` Matthew Heaney [this message]
2003-03-11 17:38       ` Warren W. Gay VE3WWG
  -- strict thread matches above, loose matches on Subject: below --
2003-03-12 22:04 Alexandre E. Kopilovitch
2003-03-12 22:20 ` Larry Kilgallen
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox