I think have a few options:
- 1. Just read in the whole file in memory and pretend like nothing. This is my quick-fix idea, and probably what I'll start doing.
2. Do something smart on my own, i.e. open the file, read in a reasonably amount of data in a buffer, and then read in chunks of the file when needed.
3. Use the exec/MMU/MapMemory... which seems to be sort of the same thing as mmap. However, the autodocs tell me:
Obviously I'm in dobut.This function is extremely dangerous to use if you don't know what you're doing. And since the virtual addressing architecture is not publically documented, you do *NOT* know what you're doing. If in doubt, don't use this function, and rely on ExecSG to do the job.
4. As above: rely on ExecSG to do the job. Could I use the extmem stuff for this?
Therefor I'm thinking that extmem is not what I'm looking for... or? I'm thinking that I'd allocate an extmem chunk same size as the file, but then you'd need to read the whole file into the virtual memory, which could be unneccessary if not the entire is to be used.
Option 2 is relatively straight forward to do, although there's a lot of stuff to take into consideration, and if f.i. MMU/MapMemory works reliably, I'd rather not re-invent the wheel. But: I don't know what I'm doing there, apparently.
Do anyone have any ideas, or perhaps other methods I haven't thought of?