Mail Archives: djgpp/1996/07/15/11:58:30
Mark Habersack <grendel AT ananke DOT amu DOT edu DOT pl> wrote:
>Hi all,
> I was just recently wondering whether it is possible in a.out format to add
>new sections (in addition to .text & .data). My doubt is: if it was possible
>someone would have thinked about adding i.e. string resources in separate
>section that doesn't have to be loaded at startup, only on demand. I don't
>know much about details of a.out, so any info is appreciated.
> Thanx, Mark
With virtual memory, though, you sort of have that anyway; anything in
your data sections will get loaded at startup, but if memory gets
tight, it'll soon swap out if you don't use it much. It will come back
into memory on demand. With VM like that, there's no need for any kind
of overlay-like system.
Example: my game uses loads of data: samples, animations, images, AI
brainmaps, you name it. They're all stored in compressed archive files
on disk. At startup, the game loads all this into 'memory', which of
course will be mostly swapped out (When it's finished, anyway. At the
mo, we have less than 1 meg of data... that'll start to rise as our
graphics god gets his arse into gear and renders some animations...)
This means that all that data is available on demand, pretty quickly,
without the overhead of something like "void *load_resource(int
number);".
Regards,
ABW
--
I have become... Comfortably numb...
Alaric B. Williams Internet : alaric AT abwillms DOT demon DOT co DOT uk
<A HREF="http://www.hardcafe.co.uk/Alaric/">http://www.hardcafe.co.uk/Alaric/</A>
- Raw text -