comp.lang.ada
 help / color / mirror / Atom feed
From: Florian Weimer <fw@deneb.enyo.de>
Subject: Re: Heap vs Stack allocation
Date: Wed, 12 Oct 2005 14:35:42 +0200
Date: 2005-10-12T14:35:42+02:00	[thread overview]
Message-ID: <87d5magbfl.fsf@mid.deneb.enyo.de> (raw)
In-Reply-To: 434c2709$0$21298$626a54ce@news.free.fr

* Lionel Draghi:

> Am I right, or is this "Escape Analysis" something really powerful?

Depends on your coding style.  The savings could be significant for
some uses of Unbounded_String, for example.  It might also be faster
to return a pointer to heap object (which is in fact region or stack
allocated) than to return the unconstrained object itself, if this
saves a few copies.

All in all, I would expect that most Ada code is far less demanding
than Java code as far as the memory allocate is concerned (assuming
that you use a compiler which can allocate unconstrained objects on
the stack).



      parent reply	other threads:[~2005-10-12 12:35 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-10-11 20:56 Heap vs Stack allocation Lionel Draghi
2005-10-11 21:47 ` Randy Brukardt
2005-10-12  5:44   ` Jeffrey R. Carter
2005-10-13 23:44     ` Freejack
2005-10-13  2:47       ` Steve
2005-10-13  5:30       ` Jeffrey R. Carter
2005-10-12  1:38 ` Jon Harrop
2005-10-12 12:35 ` Florian Weimer [this message]
replies disabled

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