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-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,1d485db3760413be X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2002-10-18 07:41:33 PST Newsgroups: comp.lang.ada Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!logbridge.uoregon.edu!uunet!sea.uu.net!sac.uu.net!ash.uu.net!world!news From: Robert A Duff Subject: Re: Compiler default initialization of array types User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.2 Sender: news@world.std.com (Mr Usenet Himself) Message-ID: Date: Fri, 18 Oct 2002 14:40:58 GMT Content-Type: text/plain; charset=us-ascii References: NNTP-Posting-Host: shell01.theworld.com Mime-Version: 1.0 Organization: The World Public Access UNIX, Brookline, MA Xref: archiver1.google.com comp.lang.ada:29905 Date: 2002-10-18T14:40:58+00:00 List-Id: Kilgallen@SpamCop.net (Larry Kilgallen) writes: > Efficiency will depend on the compiler and potentially the operating > system. For package-level data on VMS, compilers that need a lot of > zeroed memory will typically emit linker instructions to "fake it" > with manipulation of the memory management system. The zero-page tricks of VMS are nice, but they couldn't help in the case I mentioned. Nor could compiler optimizations, unless the compiler was *really* clever. These objects were heap-allocated. An OS can use virtual-memory tricks to produce huge arrays of zero pages, but it seems infeasible to always go directly to the OS for every "new". - Bob