comp.lang.ada
 help / color / mirror / Atom feed
From: NiGHTS <nights@unku.us>
Subject: A simple question about the "new" allocator
Date: Mon, 11 Aug 2014 23:54:50 -0700 (PDT)
Date: 2014-08-11T23:54:50-07:00	[thread overview]
Message-ID: <d4137ad0-148a-4cf9-a6d8-c36e60ae7c9f@googlegroups.com> (raw)

With all default configurations using a typical Ada compiler, will the following code run indefinitely without fail or will it eventually crash?

procedure main is 

    Test : access Positive;

begin

    loop
        Test := new Positive;
    end loop;

end main;

If this does crash, what would be another way to write this program so that it does not crash? I would prefer not to use Ada.Unchecked_Deallocation.

             reply	other threads:[~2014-08-12  6:54 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-08-12  6:54 NiGHTS [this message]
2014-08-12  7:35 ` A simple question about the "new" allocator Dmitry A. Kazakov
2014-08-12 13:38   ` G.B.
2014-08-12 10:29 ` sbelmont700
2014-08-12 18:49   ` Shark8
2014-08-12 19:10     ` Adam Beneschan
2014-08-12 21:53       ` Niklas Holsti
2014-08-12 22:34         ` Adam Beneschan
2014-08-12 23:14           ` sbelmont700
2014-08-12 23:41             ` Adam Beneschan
2014-08-13  7:36               ` Dmitry A. Kazakov
2014-08-13 15:04                 ` Adam Beneschan
2014-08-13 20:32           ` Niklas Holsti
2014-08-12 15:10 ` Adam Beneschan
2014-08-12 16:07 ` Jeffrey Carter
2014-08-12 19:58   ` Robert A Duff
2014-08-12 17:51 ` NiGHTS
replies disabled

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