delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1997/09/04/20:20:13

From: firewind <firewind AT metroid DOT dyn DOT ml DOT org>
Newsgroups: comp.os.msdos.djgpp
Subject: Re: HELP! Protected mode memory allocation
Date: 4 Sep 1997 22:32:47 GMT
Organization: Netcom
Lines: 20
Message-ID: <5uncuf$acu@sjx-ixn4.ix.netcom.com>
References: <340DE895 DOT 59D6457A AT virgin DOT net>
NNTP-Posting-Host: elp-tx2-08.ix.netcom.com
Mime-Version: 1.0
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp

Ian Thompson <leanne DOT mckee AT virgin DOT net> wrote:
> I wish to use protected mode, say 8 megs of flat address space in my
> programme.
> Put data in, take data out etc...  Any pitfalls I should look out for?
> An example of how to do this in 'C' would be really apprectiated.

Because of the way DJGPP works, no special hacks or tricks are required in
order to access the entire amount of memory on the system. DJGPP is inherently
and totally a flat-mode 32-bit environment. Go ahead: just malloc() 8MB of
memory... stand back and be amazed. :)

However, if you wish to use typical DOSish things like interrupts and
accessing a specific low-memory address (such as that of the video card) you
will need to be careful. Take a look at the FAQ for more information on
these topics.

-- 
[- 				 firewind	                            -]
[-   email: firewind AT metroid DOT dyn DOT ml DOT org (home), firewind AT aurdev DOT com (work)  -]
[- 	    "You're just jealous because the voices talk to -me-."          -]

- Raw text -


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