comp.lang.ada
 help / color / mirror / Atom feed
From: Kilgallen@SpamCop.net (Larry Kilgallen)
Subject: Re: Compiler default initialization of array types
Date: 18 Oct 2002 10:04:39 -0500
Date: 2002-10-18T10:04:39-05:00	[thread overview]
Message-ID: <sfoI1HrYrrDm@eisner.encompasserve.org> (raw)
In-Reply-To: wcc3cr3stc5.fsf@shell01.TheWorld.com

In article <wcc3cr3stc5.fsf@shell01.TheWorld.com>, Robert A Duff <bobduff@shell01.TheWorld.com> 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.



  reply	other threads:[~2002-10-18 15:04 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-10-17 12:55 Compiler default initialization of array types Sebastian
2002-10-17 13:10 ` Lutz Donnerhacke
2002-10-17 22:39   ` Peter Richtmyer
2002-10-17 13:42 ` Matthew Heaney
2002-10-17 23:57   ` Robert A Duff
2002-10-18  9:50     ` Larry Kilgallen
2002-10-18 14:40       ` Robert A Duff
2002-10-18 15:04         ` Larry Kilgallen [this message]
2002-10-18 13:36     ` Matthew Heaney
2002-10-18 15:28     ` Wes Groleau
  -- strict thread matches above, loose matches on Subject: below --
2002-10-17 14:23 Grein, Christoph
replies disabled

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