« If you have a large dataset in a file: and a) only need access to small bits of it in any given run; b) you can find those bits without reading through the whole file from the beginning; then mapping can be an effective way on minimising the number of pages read from disk. »
in reply to Re: mmaping a large file
in thread mmaping a large file
yes, that's exactly the use case.
I've just tried:
new Sys::Mmap my $f, 8192, q(bigfile);
but now I get an error during cleaning:
(in cleanup) munmap failed! errno 22 Invalid argument
This is not going to be easy, is it?