Memory usage when using boost::iostreams::mapped_file
问题 I am pasting some code here which uses boost iostream to mmap & then writes to the mapped file: typedef unordered_map<int, string> work; int main() { work d; d[0] = "a"; boost::iostreams::mapped_file_params params; params.path = "map.dat"; params.new_file_size = 1000000000; params.mode = (std::ios_base::out | std::ios_base::in); boost::iostreams::mapped_file mf; mf.open(params); work* w = static_cast<work*>((void*)mf.data()); w[0] = d; for(int i=1; i <1000000000 ;++i) { w->insert(std::make