comp.lang.ada
 help / color / mirror / Atom feed
From: sjw <simon.j.wright@mac.com>
Subject: Re: Storage management
Date: Sat, 1 Nov 2008 15:36:49 -0700 (PDT)
Date: 2008-11-01T15:36:49-07:00	[thread overview]
Message-ID: <e7a52e20-16e1-4810-b13f-59dc63183cdf@p31g2000prf.googlegroups.com> (raw)
In-Reply-To: 87fxmbog1u.fsf@mid.deneb.enyo.de

On Nov 1, 11:13 am, Florian Weimer <f...@deneb.enyo.de> wrote:
> What is the current state of the art with regard to programmer support
> for storage management?
>
> With GNAT, Ada.Finalization adds tons of run-time calls to deal with
> abort deferral (even with pragma Restrictions (No_Abort_Statements)),
> puts the object on some sort of list, and does some secondary stack
> allocations which I don't understand.  Clearly, this is not supposed
> to be used in performance-critical code, so I doubt it can be used for
> a generic smart pointer implementation.  (Object allocation in inner
> loops is generally a bad idea, but this overhead is also incurred when
> copying smart pointers around.)

It has to depend on how fast a processor you can afford to buy for
your application. Here (2.4 GHz Macbook Pro, GCC 4.3.0) it takes 150
ns to allocate/free a character vs 1050 ns for the (rough) equivalent
using a BC smart pointer.



      parent reply	other threads:[~2008-11-01 22:36 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-11-01 11:13 Storage management Florian Weimer
2008-11-01 22:28 ` Robert A Duff
2008-11-02 14:27   ` Florian Weimer
2008-11-07  1:14     ` Randy Brukardt
2008-11-07  8:30       ` Dmitry A. Kazakov
2008-11-07  9:54         ` Niklas Holsti
2008-11-07  9:20           ` Dmitry A. Kazakov
2008-11-07 12:12             ` Niklas Holsti
2008-11-07 13:22               ` Dmitry A. Kazakov
2008-11-07 13:28                 ` Georg Bauhaus
2008-11-07 14:41                   ` Dmitry A. Kazakov
2008-11-10 14:28                 ` christoph.grein
2008-11-10 16:08                   ` Dmitry A. Kazakov
2008-11-08 11:04         ` sjw
2008-11-08 12:33           ` Dmitry A. Kazakov
2008-11-10  9:34             ` sjw
2008-11-01 22:36 ` sjw [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