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 08:04:43 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!bloom-beacon.mit.edu!news-out.cwix.com!newsfeed.cwix.com!news.binc.net!kilgallen From: Kilgallen@SpamCop.net (Larry Kilgallen) Newsgroups: comp.lang.ada Subject: Re: Compiler default initialization of array types Date: 18 Oct 2002 10:04:39 -0500 Organization: LJK Software Message-ID: References: NNTP-Posting-Host: eisner.encompasserve.org X-Trace: grandcanyon.binc.net 1034953470 25071 192.135.80.34 (18 Oct 2002 15:04:30 GMT) X-Complaints-To: abuse@binc.net NNTP-Posting-Date: Fri, 18 Oct 2002 15:04:30 +0000 (UTC) Xref: archiver1.google.com comp.lang.ada:29908 Date: 2002-10-18T10:04:39-05:00 List-Id: In article , Robert A Duff writes: > 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". Certainly. But if initialization is overwhelming for a particular application, switching to non-heap allocation (I hesitate to ever use the word "static" in this newsgroup) might help in some environments.