delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1996/07/15/11:58:30

Xref: news2.mv.net comp.os.msdos.djgpp:5952
From: alaric AT abwillms DOT demon DOT co DOT uk (Alaric B. Williams)
Newsgroups: comp.os.msdos.djgpp
Subject: Re: a.out sections
Date: Sat, 13 Jul 1996 17:45:28 GMT
Lines: 37
Message-ID: <837279840.14708.0@abwillms.demon.co.uk>
References: <Pine DOT NEB DOT 3 DOT 93 DOT 960712124109 DOT 16468B-100000 AT ananke DOT amu DOT edu DOT pl>
NNTP-Posting-Host: abwillms.demon.co.uk
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp

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 -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019