From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=unavailable autolearn_force=no version=3.4.4 Path: eternal-september.org!reader01.eternal-september.org!reader02.eternal-september.org!news.eternal-september.org!mx02.eternal-september.org!.POSTED!not-for-mail From: Simon Wright Newsgroups: comp.lang.ada Subject: Re: silly ravenscar question Date: Tue, 24 Feb 2015 16:52:02 +0000 Organization: A noiseless patient Spider Message-ID: References: <8e30f54c-81c4-4861-897c-bb6c563c76e8@googlegroups.com> <87wq37d12w.fsf@adaheads.sparre-andersen.dk> <7ae5ec06-f5e3-4c5f-ac95-58b4bf1256a0@googlegroups.com> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: mx02.eternal-september.org; posting-host="e618d14f82e68d7a5374d9f6ab6c203f"; logging-data="20450"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18ocREDYUJU2yaSOMibadZ/Pr1ZVXcQBW4=" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.4 (darwin) Cancel-Lock: sha1:EmKlyUAOQIekOdn2DE/v6GGbSVE= sha1:xL61ajJgqATRpX4QVEFea+2hyZM= Xref: news.eternal-september.org comp.lang.ada:25018 Date: 2015-02-24T16:52:02+00:00 List-Id: Brad Moore writes: > You might be thinking of the restriction, No_Implicit_Heap_Allocations > which is part of the Ravenscar Profile. That restricts the runtime > from making allocations from the heap, but it does not restrict > application code from using the heap to allocate objecs. >From a hobbyist point of view, the Ravenscar approach to _tasking_ makes a lot of sense, because full Ada tasking is very hairy (the restricted tasking in GNAT's Ravenscar is hairy enough). But some of the other restrictions, like this one, are less appropriate outside the critical area. OK, so far the only user-visible effect I see is in packages like Interfaces.C.Strings, where it's obvious to you and me that New_Char_Array and New_String are going to allocate memory, but No_Implicit_Heap_Allocations prevents 'new' (I used FreeRTOS's memory management routines instead), and in Containers, where you're restricted to the Bounded versions (no great problem there).