comp.lang.ada
 help / color / mirror / Atom feed
* Ravenscar and portability
@ 2007-08-29  7:52 Maciej Sobczak
  2007-08-30 23:08 ` Robert A Duff
  0 siblings, 1 reply; 3+ messages in thread
From: Maciej Sobczak @ 2007-08-29  7:52 UTC (permalink / raw)


The Ravenscar profile contains the No_Implicit_Heap_Allocations
constraint.

The problem is that the operations that might require implicit heap
allocation are implementation-defined. This means that programs can be
declared as Ravenscar-compliant *only* in the context of some chosen
Ada implementation.

Is that right?

--
Maciej Sobczak
http://www.msobczak.com/




^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Ravenscar and portability
  2007-08-29  7:52 Ravenscar and portability Maciej Sobczak
@ 2007-08-30 23:08 ` Robert A Duff
  2007-08-31  7:23   ` Maciej Sobczak
  0 siblings, 1 reply; 3+ messages in thread
From: Robert A Duff @ 2007-08-30 23:08 UTC (permalink / raw)


Maciej Sobczak <see.my.homepage@gmail.com> writes:

> The Ravenscar profile contains the No_Implicit_Heap_Allocations
> constraint.
>
> The problem is that the operations that might require implicit heap
> allocation are implementation-defined. This means that programs can be
> declared as Ravenscar-compliant *only* in the context of some chosen
> Ada implementation.
>
> Is that right?

Yes.  But in practise, most implementations are pretty uniform in this
regard, so it's pretty portable.

I believe all of Ada's features, excluding some predefined library
units, can be implemented without implicit heap allocation.

But I'm not even sure how to precisely define "implicit heap
allocation".

The Strings.Unbounded does heap allocation.  Is it "implicit"?

- Bob




^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Ravenscar and portability
  2007-08-30 23:08 ` Robert A Duff
@ 2007-08-31  7:23   ` Maciej Sobczak
  0 siblings, 0 replies; 3+ messages in thread
From: Maciej Sobczak @ 2007-08-31  7:23 UTC (permalink / raw)


On 31 Sie, 01:08, Robert A Duff <bobd...@shell01.TheWorld.com> wrote:

> > The Ravenscar profile contains the No_Implicit_Heap_Allocations
> > constraint.
>
> > The problem is that the operations that might require implicit heap
> > allocation are implementation-defined. This means that programs can be
> > declared as Ravenscar-compliant *only* in the context of some chosen
> > Ada implementation.

> I believe all of Ada's features, excluding some predefined library
> units, can be implemented without implicit heap allocation.

What about unconstrained types? Indeed, basic use cases can be
implemented on the stack, but I might be missing something less
obvious.

> But I'm not even sure how to precisely define "implicit heap
> allocation".

Good question, but I was not around when Ravenscar was defined...

> The Strings.Unbounded does heap allocation.  Is it "implicit"?

I would say yes, because the usage of heap is not stated in the
standard. It might be a common implementation practice and there might
even be no other choice, but it is not stated.

--
Maciej Sobczak
http://www.msobczak.com/




^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2007-08-31  7:23 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-08-29  7:52 Ravenscar and portability Maciej Sobczak
2007-08-30 23:08 ` Robert A Duff
2007-08-31  7:23   ` Maciej Sobczak

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