Re: pointer questions



Martin Dowie <martin.dowie@xxxxxxxxxxxxxxx> writes:

> Marc A. Criley wrote:
> > Martin Dowie wrote:
> >> Embedded defence apps and I can't remember the last time I needed an
> >> access type!
> >>
> >> There's no need in this sort of app, as you know at compile time what
> >> the maximum number of anything your system is required to deal with,
> >> so you can always use a lookup table of some sort (even if it has an
> >> 'In_Use : Boolean' field/discriminant.
> > Now that is exactly the domain where I would expect to not see access
> > types, for the reasons you cite (as well as related reasons having to
> > do with predictability and the consequences of errors.)
>
> More error related than predictability I hope! Or is there some
> dangerous non-determinism associated with access types I haven't come
> across yet?! :-)

Not with access types per se, but if you do heap allocation using the
default storage pool, it's hard to predict if/when you will run out of
memory. But if you use user-defined storage pools, you can make them
predictable (and then access types become pretty-much equivalent to
your "lookup table of some sort").

- Bob
.