[SDL] [OT] Resource file
sbizna at tejat.net
Wed Feb 20 00:41:37 PST 2008
On 2/19/08, Andre de Leiradella <leiradella at bigfoot.com> wrote:
> 1. Is there any thing bad about mmapping a resource file? The file size
> can easily be greater than 4 GiB.
Pages that are mmapped from the file can't be used for other memory.
Therefore, on most 32-bit platforms, an app using a resource file
that's near 2GiB would have serious memory starvation problems. If you
selectively mmap only relevant portions instead, that's not a problem,
I think; and mmap generally provides a significant performance
improvement in situations like this.
> 4. Do you have requirements for a new resource file?
I probably won't use this (none of my current projects require
anything like it), but were I to need it, portability would be a
primary concern. I live on a distressing variety of CPU architectures
and operating systems, and too often is a nice-looking library ruined
because it won't work on all of them. (ONE of my computers is x86.)
P.S. Cryptographic hashes for the resource file, complete with
provisions for a PKI, would be pretty sweet.
More information about the SDL