From: Robert A Duff <bobduff@shell01.TheWorld.com>
Subject: Re: Mission-Critical Design: Ada.Unchecked_Deallocation vs Garbage Collection
Date: Wed, 23 Jul 2014 18:07:10 -0400
Date: 2014-07-23T18:07:10-04:00 [thread overview]
Message-ID: <wccppgv3f1t.fsf@shell01.TheWorld.com> (raw)
In-Reply-To: 755is9pqec24if5ecnatvc05uindaphd40@4ax.com
Dennis Lee Bieber <wlfraed@ix.netcom.com> writes:
> On Thu, 17 Jul 2014 23:17:48 -0700 (PDT), NiGHTS <nights@unku.us> declaimed
> the following:
>
>>In mission-critical design applications, do they favor garbage collectors or the unchecked deallocation?
>>
> Based upon the examples I've seen at work (flight management systems):
> NEITHER...
>
> Any dynamic memory gets allocated during the initialization step (based
> on some configuration "file" to identify how much of each component to
> create), and once that completes the only "dynamic" memory is the stack
> (and not even the secondary stack used in some operations -- like run-time
> string concatenation; no: put("string " & integer'image(val) & " more"); )
That particular example can be done without using the secondary stack in
the latest version of GNAT. All the temps are allocated on the primary
stack, with compile-time-known size. The length of X&Y is equal to the
sum of the lengths of X and Y. The maximum length of the 'Image result is 11.
Take a look at the output of -gnatD if you want to see how that works.
- Bob
next prev parent reply other threads:[~2014-07-23 22:07 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-07-18 6:17 Mission-Critical Design: Ada.Unchecked_Deallocation vs Garbage Collection NiGHTS
2014-07-18 6:25 ` Jeffrey Carter
2014-07-18 7:51 ` J-P. Rosen
2014-07-19 9:07 ` Pascal Obry
2014-07-18 12:41 ` Dennis Lee Bieber
2014-07-23 22:07 ` Robert A Duff [this message]
2014-07-24 1:00 ` Dennis Lee Bieber
2014-07-24 6:52 ` Simon Wright
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox