| Author | lloyd@randombit.net |
|---|---|
| Branch | net.randombit.botan |
| Changelog |
If MAP_NOSYNC is defined, pass it as a flag to mmap. Apparently on FreeBSD, by default the VM will sync dirty pages periodically, even if the pages do not need to be reclaimed. Since in this case the contents of the map will contain sensitive information, try to avoid that. The FreeBSD 7.0 man page for mmap also warns that severe file fragmentation can result from using MAP_NOSYNC with sparse files, which we are currently using. It recommends instead explicitly writing out zero bytes. Since typically the full range of pages in the file will be eventually accessed and modified, this doesn't seem like a problem. |
| Date | 2008-07-17T16:17:40 |
| Oldrevision |
Old revision is: [53e41f9c..] (diff) |
|---|---|
| Patch |
Patch file modules/alloc_mmap/mmap_mem.cpp (diff) |