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: <387B07CF.B667643C@mail.com>#1/1 X-Deja-AN: 571126512 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> X-Accept-Language: en Content-Type: text/plain; charset=us-ascii X-Complaints-To: usenet@sunrise.ch X-Trace: news1.sunrise.ch 947587024 27749 195.141.231.162 (11 Jan 2000 10:37:04 GMT) Organization: sunrise communications ag Mime-Version: 1.0 NNTP-Posting-Date: 11 Jan 2000 10:37:04 GMT Newsgroups: comp.lang.ada Date: 2000-01-11T10:37:04+00:00 List-Id: Robert A Duff wrote: > Commit on use is indeed very cool. > > Do you know which operating systems support it? VMS. And I think most major Unices also support it, as well as NT. If you want to know, compile and run the following program and see what happens: -- with Ada.Numerics.Discrete_Random; procedure Try_Commit_On_Use is Size : constant := 100_000_000; -- Size of memory allocated. Pages : constant := 1_000; -- Number of pages to reference. type Big is array (1 .. Size) of Character; type Big_Access is access Big; subtype Bar is Integer range 1 .. Pages; package Bar_Random is new Ada.Numerics.Discrete_Random(Bar); Generator : Bar_Random.Generator; Z : Big_Access; begin Z := new Big; loop Z(Size / Pages * Bar_Random.Random(Generator)) := Z(Size / Pages * Bar_Random.Random(Generator)); end loop; end;