comp.lang.ada
 help / color / mirror / Atom feed
From: Hannes Haug <Hannes.Haug@Student.Uni-Tuebingen.de>
Subject: Re: Q: memory management
Date: 1996/06/16
Date: 1996-06-16T00:00:00+00:00	[thread overview]
Message-ID: <uvvafy3ucoc.fsf@chaq.informatik.uni-tuebingen.de> (raw)
In-Reply-To: uvv4tod9j9e.fsf@chaq.informatik.uni-tuebingen.de


>>>>> "Jon" == Jon S Anthony <jsa@organon.com> writes:

    Jon> In article <uvv4tod9j9e.fsf@chaq.informatik.uni-tuebingen.de>
    Jon> Hannes Haug <Hannes.Haug@Student.Uni-Tuebingen.de> 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




  parent reply	other threads:[~1996-06-16  0:00 UTC|newest]

Thread overview: 30+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1996-06-15  0:00 Q: memory management Hannes Haug
1996-06-15  0:00 ` Robert Dewar
1996-06-15  0:00 ` Jon S Anthony
1996-06-16  0:00   ` Robert Dewar
1996-06-18  0:00   ` Kent Mitchell
1996-06-16  0:00 ` Hannes Haug [this message]
1996-06-17  0:00   ` Tucker Taft
1996-06-17  0:00   ` Hannes Haug
1996-06-18  0:00   ` Hannes Haug
1996-06-18  0:00     ` Tucker Taft
1996-06-19  0:00     ` Hannes Haug
1996-06-18  0:00 ` Jon S Anthony
  -- strict thread matches above, loose matches on Subject: below --
1996-06-19  0:00 W. Wesley Groleau (Wes)
1996-06-20  0:00 ` Hannes Haug
1996-06-20  0:00 ` Hannes Haug
1996-06-20  0:00   ` Robert Dewar
1996-06-21  0:00 ` Hannes Haug
1996-06-21  0:00   ` Robert Dewar
1996-06-25  0:00 ` Hannes Haug
1996-06-24  0:00 Q: Memory management W. Wesley Groleau (Wes)
1996-06-25  0:00 ` Hannes Haug
1996-06-25  0:00   ` Robert A Duff
1996-06-25  0:00   ` Tucker Taft
     [not found]     ` <Dtzv4J.9FL@thomsoft.com>
1996-07-17  0:00       ` Robert Dewar
1996-06-25  0:00 ` Jon S Anthony
1996-06-26  0:00   ` Robert Dewar
1996-06-27  0:00 ` Hannes Haug
     [not found] <JSA.96Jun26142033@organon.com>
1996-06-27  0:00 ` Hannes Haug
1996-06-27  0:00   ` Robert A Duff
1996-06-27  0:00 ` Hannes Haug
replies disabled

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