I use boost latest version 1.6.0 and Visual studio 2015. mapped_file_source throw exception when file size bigger than 500MB.
the exception said "failed mapping view: The parameter is incorrect. : iostream stream error"
How can i open bigger than 500MB file?
that's my code here.
bool CompareFile(path file1, path file2)
{
try {
boost::iostreams::mapped_file_source f1(file1);
boost::iostreams::mapped_file_source f2(file2);
if (std::memcmp(f1.data(), f2.data(), f1.size()))
return false;
else
return true;
}
catch (const std::exception& e)
{
e.what();
return false;
}
catch (...)
{
return false;
}
}