delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1997/05/15/20:48:03

From: ao950 AT FreeNet DOT Carleton DOT CA (Paul Derbyshire)
Newsgroups: comp.os.msdos.djgpp
Subject: Re: Problem with memory allocation...
Date: 15 May 1997 22:33:33 GMT
Organization: The National Capital FreeNet
Lines: 23
Message-ID: <5lg2vt$i6v@freenet-news.carleton.ca>
References: <3379962D DOT 348A AT iiic DOT ethz DOT ch>
Reply-To: ao950 AT FreeNet DOT Carleton DOT CA (Paul Derbyshire)
NNTP-Posting-Host: freenet2.carleton.ca
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp

Andrea Martino (amartino AT iiic DOT ethz DOT ch) writes:
> I have a problem with DJGPP memory features...
> 
> I would like to choose where my data will be stored (in physical memory
> or in the virtual one), because I will to store my 3D world in RAM and
> other things like data-bases in virtual memory.

Store the virtual world in memory in whatever you like (arrays, structs,
and that); then, for each such area after it has been mallocked, call

_go32_lock_physical_memory (start addr, end addr) IIRC. (or is it start
addr,size?)

Or, if you are using Allegro, use LOCK_VARIABLE(my_var) which is a macro
in Allegro that does the same job, and is there mainly for locking memory
touched by timer and vtrace interrupts.

--
    .*.  Where feelings are concerned, answers are rarely simple [GeneDeWeese]
 -()  <  When I go to the theater, I always go straight to the "bag and mix"
    `*'  bulk candy section...because variety is the spice of life... [me]
Paul Derbyshire ao950 AT freenet DOT carleton DOT ca, http://chat.carleton.ca/~pderbysh

- Raw text -


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