Page 1 of 1
Cross-platform file mapping
Posted: Fri Apr 04, 2008 7:23 am
by Mistrel
File mapping is a great way to copy data from disk to disk without having to first load it into memory. This is an excellent feature of the Windows API and I believe Linux support it as well. It would be great to see a cross-platform solution in PureBasic for this.
Posted: Fri Apr 04, 2008 5:42 pm
by DoubleDutch
+1
Posted: Fri Apr 04, 2008 6:06 pm
by nco2k
they improved the file operations by adding a read/write cache to v4.00, so i doubt they are going to rewrite the whole set again, sometime soon. the lib is very fast now (imho) and the question is, how much faster is it going to be, when they switch to file mapping?
c ya,
nco2k
Re: Cross-platform file mapping
Posted: Fri Apr 04, 2008 6:42 pm
by Trond
Mistrel wrote:File mapping is a great way to copy data from disk to disk without having to first load it into memory. This is an excellent feature of the Windows API and I believe Linux support it as well. It would be great to see a cross-platform solution in PureBasic for this.
Can't you just use CopyFile() for that?
Re: Cross-platform file mapping
Posted: Fri Apr 04, 2008 7:56 pm
by Mistrel
Trond wrote:Can't you just use CopyFile() for that?
CopyFile() isn't useful if I want to copy only a portion of the file.
Posted: Fri Apr 04, 2008 9:35 pm
by Trond
Actually, if you want to copy between multiple disks the data would be bound to go through memory somewhen. The difference is just who does it. It won't bring a big speed increase.