possible to writefile to memory for speed?

BlitzMax Forums/BlitzMax Programming/possible to writefile to memory for speed?

Robert Cummings(Posted 2010) [#1]
Hi,

I have a pretty complex editor and it'll be a bit of a nightmare to figure out how to save all the memory variables and so on to a copied block of memory so for the sake of a quick hacky undo/redo can I direct output to a temp memory location instead of physical disc? is this even faster or worth it?


SebHoll(Posted 2010) [#2]
Check out Brl.RamStream - it allows you to allocate memory (say an array of 4096 bytes), and then create a stream to that memory address.


Robert Cummings(Posted 2010) [#3]
Thats interesting! any examples for reading back from that as well...?


Ked(Posted 2010) [#4]
any examples for reading back from that as well...?

Incbin is a perfect example.