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.3 required=5.0 tests=BAYES_00,FREEMAIL_FROM, INVALID_MSGID autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,7b69a8818c20ab9f X-Google-Attributes: gid103376,public From: Mats Weber Subject: Re: Y21C Bug Date: 2000/01/11 Message-ID: <387B0AC9.AA4E090B@mail.com>#1/1 X-Deja-AN: 571129402 Content-Transfer-Encoding: 7bit References: <84nqbo$q28$1@nnrp1.deja.com> <84o0g2$u8v$1@nnrp1.deja.com> <84pvrs$7q1@ftp.kvaerner.com> <84sltt$7s3@ftp.kvaerner.com> <84t966$be0$1@nnrp1.deja.com> <84vev2$7p4@ftp.kvaerner.com> <38737352.B282CC2@easystreet.com> <851j2q$78q1@ftp.kvaerner.com> <852dt0$vdl$1@nnrp1.deja.com> <87iu16yxv4.fsf@deneb.cygnus.argh.org> X-Accept-Language: en Content-Type: text/plain; charset=us-ascii X-Complaints-To: usenet@sunrise.ch X-Trace: news1.sunrise.ch 947587790 4376 195.141.231.162 (11 Jan 2000 10:49:50 GMT) Organization: sunrise communications ag Mime-Version: 1.0 NNTP-Posting-Date: 11 Jan 2000 10:49:50 GMT Newsgroups: comp.lang.ada Date: 2000-01-11T10:49:50+00:00 List-Id: Robert A Duff wrote: > I thought "commit on use" (or "zero on use") meant that (as in your > example below), virtual memory is allocated, but physical memory is not. > Then, a read or write of that memory will trap, and the operating system > will gin up an all-zeros page of memory. That is what is happening on most modern systems. For instance when you start an executable, it is mapped to virtual memory but not read into memory. Then execution is transferred to a virtual memory address within the mapped executable, causing a page fault which loads a few pages from the executable, and so on. So, if you don't use some pages of code, they will never get loaded. > Still nobody has answered my question about which operating systems > support these fancy things. It works that way on VMS (that I know for sure) and most Unices and NT. Even the current MacOS uses that scheme for loading executables. > On the other hand, I once wrote something like: > > X: array(1..One_Zillion) of Integer := (others => 0); > > and the DEC Ada compiler blew up at compile time, apparently trying to > be clever at run time. DEC Ada creates the allocator in the object file if everything is static. That's why you can't compile this.