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.3 required=5.0 tests=BAYES_00,INVALID_MSGID autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,42a57c8ee023f14d X-Google-Attributes: gid103376,public From: Hannes Haug Subject: Re: Q: memory management Date: 1996/06/16 Message-ID: #1/1 X-Deja-AN: 160460688 sender: haugha@chaq.informatik.uni-tuebingen.de references: organization: Uni Tuebingen newsgroups: comp.lang.ada Date: 1996-06-16T00:00:00+00:00 List-Id: >>>>> "Jon" == Jon S Anthony writes: Jon> In article Jon> Hannes Haug writes: >> I'm new to Ada and have a question on memory management. Is >> there a function like malloc in Ada ? I want just a pointer to >> a certain amount of raw storage. Jon> the reserved word _new_ in an allocator context. [...] I know about new. >> I think "new Storage_Array (n)" will give me a little bit too >> much storage. The array bounds need some space. Jon> I don't know what "storage_array" is, but don't worry about Jon> the space for bounds. It's all taken care of for you. But I really just want a pointer to some amount of storage. I have to pass it to som assembly routines. This routines cannot benefit from the bounds in the array representatio. They would even overwrite them. And I have to worry about space. The here useless bounds would cost me at least 1MB. >> Does "Allocate (some_storage_pool, addr, n, Word_Size / >> Storage_Unit)" work ? Which storage pool do I have to choose ? Jon> At this point don't worry about user defined storage pools Jon> and allocation/deallocation. Just use the standard Jon> predefined ones. Not possible. Perhaps I have to use malloc. - hannes