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, MSGID_RANDY autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,c32f6f0b23106020 X-Google-Attributes: gid103376,public From: Robert Dewar Subject: Re: Large strings in ADA Date: 2000/04/17 Message-ID: <8dfonn$c1a$1@nnrp1.deja.com>#1/1 X-Deja-AN: 612349556 References: <38FB4521.D02EA4C9@xpress.se> X-Http-Proxy: 1.0 x22.deja.com:80 (Squid/1.1.22) for client 205.232.38.14 Organization: Deja.com - Before you buy. X-Article-Creation-Date: Mon Apr 17 19:30:19 2000 GMT X-MyDeja-Info: XMYDJUIDrobert_dewar Newsgroups: comp.lang.ada X-Http-User-Agent: Mozilla/4.61 [en] (OS/2; I) Date: 2000-04-17T00:00:00+00:00 List-Id: In article <38FB4521.D02EA4C9@xpress.se>, Johan Groth 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. Sent via Deja.com http://www.deja.com/ Before you buy.