[SDL] [OT] Sound and Music

Tyler Montbriand tsm at accesscomm.ca
Mon Sep 19 07:51:34 PDT 2005

On September 18, 2005 09:56 pm, Simon Roby wrote:
> I fully agree, a portable mmap abstraction would be an incredible
> addition to SDL. There should be a decent fallback on platforms that
> don't support it though...
> - SR
Now there's a toughie.  How does one emulate memory mapping without 
actually /doing/ memory mapping?  The only sane thing I can think of is using 
size-limited, allocated buffers; but that's no good for writing, and for any 
decently sized file, forces people to do all the seek-abstraction they'd be 
doing without mmap in the first place.

Worst case, emulated mmap would be slower and waste more memory than plain 
file operations.  It might end up just being something that's either 
supported or not, like CDROMs and timers.  If it ever becomes internal to 
SDL, maybye it can be used for optimizations there when present...

Interestingly, while Palm doesn't support mmap /yet/ afaik, future versions 
ought to via a linux kernel.  http://www.palmsource.com/opensource/

More information about the SDL mailing list