comp.lang.ada
 help / color / mirror / Atom feed
From: "Alex R. Mosteo" <devnull@mailinator.com>
Subject: Re: Efficiently setting up large quantities of constant data
Date: Fri, 17 Dec 2004 15:16:02 +0100
Date: 2004-12-17T15:16:02+01:00	[thread overview]
Message-ID: <41C2EA22.2080107@mailinator.com> (raw)
In-Reply-To: <pan.2004.12.17.13.54.28.292140@linuxchip.demon.co.uk.uk.uk>

Dr. Adrian Wrigley wrote:
> OK I have just tried this.
> 
> I have a plain text file "NigeriaScam4.txt", which I turn into
> an object file "nigeria.o", and link in. (Source below)

You should check AWS resources. I think it can be more "ada-ish". It 
seems perfectly suited for this. The only problem I've encountered is 
for very large files (over 4MB) which require huge quantities of memory 
to be compiled with Gnat. However, the latest AWS version supports 
compressed resources which may ease this problem a bit.

> 
> I encountered one or two problems:
> 
> I can't access the "..._size" value.  This is an absolute value
> in the object file, not the location where the value is stored.
> If I try to Import the size, the program crashes at runtime,
> because the size is incorrectly interpreted as the location of
> the variable storing the size.
> 
> The code works, but seems a bit messy.  Calculating the size
> is a nuisance, and I can't "import" the Message (local type
> is not constant).
> Aside from these issues, the code works.  The program
> outputs the contents of the text file as
> built into the executable.
> 
> Any ideas for:
> 
> 1) Importing the value of the ..._size symbol
> 2) Making the contents constant
> 3) Tidying it up a bit
> 
> note that writing into the Message is possible, but probably
> shouldn't be. (is there an option to make the data read-only?)
> 
> Of course, the Message could be copied into another value
> which was constant, but that would be wasteful.  Or an
> access to constant value could be used.
> 
> Thanks



  reply	other threads:[~2004-12-17 14:16 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-12-13 21:48 Efficiently setting up large quantities of constant data Michael Mounteney
2004-12-13 22:09 ` Stephen Leake
2004-12-13 22:15 ` Luke A. Guest
2004-12-14  0:20 ` Jeffrey Carter
2004-12-14  8:43 ` Martin Krischik
2004-12-14 12:18 ` Simon Wright
2004-12-15 21:10   ` Brian May
2004-12-16 23:18     ` Nick Roberts
2004-12-16 12:36 ` Dr. Adrian Wrigley
2004-12-16 13:50   ` Marc A. Criley
2004-12-17  2:32     ` John B. Matthews
2004-12-16 14:06   ` rien
2004-12-16 14:24   ` Vinzent 'Gadget' Hoefler
2004-12-16 18:12     ` Dr. Adrian Wrigley
2004-12-16 23:25       ` Nick Roberts
2004-12-17  5:20     ` tmoran
2004-12-17  8:38       ` Vinzent 'Gadget' Hoefler
2004-12-17 13:53     ` Dr. Adrian Wrigley
2004-12-17 14:16       ` Alex R. Mosteo [this message]
2004-12-16 17:11   ` Andre
2004-12-16 21:52     ` Larry Kilgallen
2004-12-16 23:23       ` Nick Roberts
2004-12-16 23:47       ` Dr. Adrian Wrigley
2004-12-19 14:34         ` Simon Wright
2004-12-16 18:29 ` Alex R. Mosteo
replies disabled

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