comp.lang.ada
 help / color / mirror / Atom feed
From: dvdeug@x8b4e53cd.dhcp.okstate.edu (David Starner)
Subject: Re: Large strings in ADA
Date: 2000/04/17
Date: 2000-04-17T00:00:00+00:00	[thread overview]
Message-ID: <8dg13f$9281@news.cis.okstate.edu> (raw)
In-Reply-To: 8dfonn$c1a$1@nnrp1.deja.com

On Mon, 17 Apr 2000 19:30:19 GMT, Robert Dewar <robert_dewar@my-deja.com> wrote:
>In article <38FB4521.D02EA4C9@xpress.se>,
>  Johan Groth <jgroth@xpress.se> wrote:
>> tmoran@bix.com wrote:
>> >
>> > >Perhaps you should try duplicating the -exact- C semantics.
>Presumably
>> > >you have a -very- large char buffer into which the items
>are copied.
>> >
>> >   If the original is in C, it must have something like
>> >      char Msg[2500000];  // 2.5 MB
>> > so the straightforward Ada equivalent would be
>> >      Msg : String(1 .. 2_500_000);  -- 2.5 MB
>>
>> The above is the current solution but it doesn't work as it
>uses to much
>> memory.
>
>
>That's odd, what machine are you on? Almost all operating
>systems use commit-on-use allocation these days.

Doesn't this try to get 2.5 MB from the stack, though? The
C equivelent does, and I assumed that most Ada compilers
(esp. GNAT) would just allocate arrays declared in a function/
procedure like that on the stack.

-- 
David Starner - dstarner98@aasaa.ofe.org
Only a nerd would worry about wrong parentheses with
square brackets. But that's what mathematicians are.
   -- Dr. Burchard, math professor at OSU




  reply	other threads:[~2000-04-17  0:00 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2000-04-16  0:00 Large strings in ADA Johan Groth
2000-04-16  0:00 ` David Starner
2000-04-17  0:00 ` Robert Dewar
2000-04-17  0:00 ` Florian Weimer
2000-04-17  0:00 ` Robert Dewar
2000-04-17  0:00 ` Dale Stanbrough
2000-04-17  0:00   ` tmoran
2000-04-17  0:00     ` Johan Groth
2000-04-17  0:00       ` Robert Dewar
2000-04-17  0:00         ` David Starner [this message]
2000-04-17  0:00       ` Florian Weimer
2000-04-17  0:00       ` tmoran
2000-04-18  0:00         ` tmoran
2000-04-22  0:00           ` Johan Groth
replies disabled

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