[SDL] [OT] Resource file

David Olofson david at olofson.net
Thu Feb 21 06:40:37 PST 2008


On Thursday 21 February 2008, Andre de Leiradella wrote:
[...]
> But only pages actually accessed by the application are actually
> brought to RAM by the OS, right? Moreover, the OS will swap out
> pages to disk if the application needs physical RAM, won't it?
[...]

Yes, but physical memory isn't the problem. The application's address 
space is. All you have is 4 GiB of address space, some of which is 
already reserved by the system (usually 1-2 GiB, depending on OS), 
and the remaining 2-3 GiB is all you have left for addressing memory, 
VRAM, memory mapped files and whatnot.

Thus, in a 32 bit environment, you need to "bank switch" large files; 
ie map only part of the file at a time.


//David Olofson - Programmer, Composer, Open Source Advocate

.-------  http://olofson.net - Games, SDL examples  -------.
|        http://zeespace.net - 2.5D rendering engine       |
|       http://audiality.org - Music/audio engine          |
|     http://eel.olofson.net - Real time scripting         |
'--  http://www.reologica.se - Rheology instrumentation  --'



More information about the SDL mailing list