comp.lang.ada
 help / color / mirror / Atom feed
From: "J-P. Rosen" <rosen@adalog.fr>
Subject: Re: silly ravenscar question
Date: Tue, 24 Feb 2015 12:24:08 +0100
Date: 2015-02-24T12:24:08+01:00	[thread overview]
Message-ID: <mchmvg$3ua$1@dont-email.me> (raw)
In-Reply-To: <8e30f54c-81c4-4861-897c-bb6c563c76e8@googlegroups.com>

Le 24/02/2015 10:07, jan.de.kruyf@gmail.com a écrit :
> Doing a variable length linked list on Gnat for Arm I found I can do
> 
> object_access := new object;
> 
> but I can not free this object. I follow that dynamic memory
> allocation is something bad (tm), under certain circumstances.

1) Ravenscar is purely about multi-tasking, and says nothing about the
sequential aspects of the language. Allocators (aka "new") are allowed
(but may be disallowed in safety critical contexts by other rules).

2) Did you look into Ada.Unchecked_Deallocation? It is a generic that
you instantiate to get the equivalent of "free".
-- 
J-P. Rosen
Adalog
2 rue du Docteur Lombard, 92441 Issy-les-Moulineaux CEDEX
Tel: +33 1 45 29 21 52, Fax: +33 1 45 29 25 00
http://www.adalog.fr

  parent reply	other threads:[~2015-02-24 11:24 UTC|newest]

Thread overview: 39+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-02-24  9:07 silly ravenscar question jan.de.kruyf
2015-02-24 10:29 ` Dmitry A. Kazakov
2015-02-24 11:11   ` jan.de.kruyf
2015-02-24 13:38     ` Dmitry A. Kazakov
2015-02-25  8:48       ` jan.de.kruyf
2015-02-25 10:46         ` Dmitry A. Kazakov
2015-02-25 17:35           ` jan.de.kruyf
2015-02-25 17:55             ` Dmitry A. Kazakov
2015-02-26  8:48               ` jan.de.kruyf
2015-02-26  9:47                 ` Dmitry A. Kazakov
2015-02-26 12:07                   ` jan.de.kruyf
2015-02-26 19:09                   ` jan.de.kruyf
2015-02-27  8:58                     ` Dmitry A. Kazakov
2015-02-28 19:57                       ` jan.de.kruyf
2015-03-01  9:27                         ` Dmitry A. Kazakov
2015-03-03  8:42                           ` jan.de.kruyf
2015-03-03 10:57                             ` Dmitry A. Kazakov
2015-02-24 11:02 ` Jacob Sparre Andersen
2015-02-24 11:23   ` jan.de.kruyf
2015-02-24 13:43     ` Bob Duff
2015-02-25  9:07       ` jan.de.kruyf
2015-02-25 17:50         ` Simon Wright
2015-02-26  7:35           ` jan.de.kruyf
2015-02-26 14:57             ` Simon Wright
2015-02-26 19:36               ` jan.de.kruyf
2015-02-27  8:45                 ` Simon Wright
2015-02-27  9:59                   ` jan.de.kruyf
2015-02-28  9:57                     ` Simon Wright
2015-02-28 19:08                       ` jan.de.kruyf
2015-02-28 20:23                         ` Simon Wright
2015-03-03  8:52                           ` jan.de.kruyf
2015-02-24 15:30     ` Brad Moore
2015-02-24 16:52       ` Simon Wright
2015-02-25  3:01         ` Dennis Lee Bieber
2015-02-24 11:22 ` slos
2015-02-24 12:16   ` jan.de.kruyf
2015-02-24 11:24 ` J-P. Rosen [this message]
2015-02-24 12:10   ` jan.de.kruyf
2015-02-24 13:58 ` 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