diff options
author | Chris Dyer <cdyer@cs.cmu.edu> | 2011-01-18 15:55:40 -0500 |
---|---|---|
committer | Chris Dyer <cdyer@cs.cmu.edu> | 2011-01-18 15:55:40 -0500 |
commit | d04c0ca2d9df0e147239b18e90650ca8bd51d594 (patch) | |
tree | 1e728067b0606870df89961d10922b4226e614bb /klm/util/mmap.hh | |
parent | b49944ee0e5f347a936df244a7c354a867c79c93 (diff) |
new version of klm
Diffstat (limited to 'klm/util/mmap.hh')
-rw-r--r-- | klm/util/mmap.hh | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/klm/util/mmap.hh b/klm/util/mmap.hh index 0a504d89..e4439fa4 100644 --- a/klm/util/mmap.hh +++ b/klm/util/mmap.hh @@ -91,9 +91,11 @@ typedef enum { READ } LoadMethod; +extern const int kFileFlags; // Wrapper around mmap to check it worked and hide some platform macros. void *MapOrThrow(std::size_t size, bool for_write, int flags, bool prefault, int fd, off_t offset = 0); + void MapRead(LoadMethod method, int fd, off_t offset, std::size_t size, scoped_memory &out); void *MapAnonymous(std::size_t size); |