From: lubaldo AT adinet DOT com DOT uy Message-Id: <3.0.1.32.19980130203727.006c24f8@adinet.com.uy> Date: Fri, 30 Jan 1998 20:37:27 -0300 To: djgpp AT delorie DOT com Subject: Physical memory, virtual memory. DJGPP+CWSDPMI, how they work? Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Precedence: bulk Hello everyone! I think this is on-topic... if it is not... sorry. I would like to know how physical memory and virtual memory works using CWSDPMI and DJGPP. I want to know this only for curiosity... but maybe this helps someone or someone has the same curiosity... Suppose I have a computer with 2 mb free of memory, DOS 6.22 and CWSDPMI as DPMI provider. Suppose I have a program (compiled with DJGPP) that it has 1mb of code and 2mb of music and bitmaps. Ok, this are my questions: 1- Suppose I load all the program and the music and the bitmaps on the startup. Then, I use only 1mb of the music and the bitmaps in a first stage, so the 2mb of the free memory are full with 1mb of code and 1mb of data. The question is: what happens when the program enters in a 2nd stage where I use the same 1mb of code but the other 1mb of the data? - The previous data is stored in virtual memory and the other data (the one that it is used now and has not been used before) is loaded in memory? - The previous data is leaved in memory and the other (new) data is readed from virtual memory? 2- CWSDPMI or DJGPP has something to optimize the speed when all the physical memory is not suficient to hold all the data (something like a cache?)? When I say virtual memory I am saying the memory that it is simulated using the harddisk. I hope I was clear, because is difficult to me write in English. Ok, TIA and goodbye! P.s: I know: if I do a program I will not load all the data that is not necessary at startup until the data is necessary and also I will free from memory the data that is not used anymore, but I want to know only. Ivan Baldo: lubaldo AT adinet DOT com DOT uy - http://members.xoom.com/baldo. Phone: (598) (2) 613 3223. Caldas 1781, Malvin, Montevideo, Uruguay, South America. (If you have problems with the previous addresses, try this ones: ibaldo AT usa DOT net, http://baldo.home.ml.org).