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: NNTP-Posting-Host: abwillms.demon.co.uk To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Mark Habersack 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 http://www.hardcafe.co.uk/Alaric/