summaryrefslogtreecommitdiff
path: root/klm/util/mmap.hh
diff options
context:
space:
mode:
authorChris Dyer <cdyer@cs.cmu.edu>2011-01-18 15:55:40 -0500
committerChris Dyer <cdyer@cs.cmu.edu>2011-01-18 15:55:40 -0500
commitbee6a3c3f6c54cf7449229488c6124dddc7e2f31 (patch)
treef407d57998b648d9341990d4a4de974b5104ed97 /klm/util/mmap.hh
parent10715e9606500b34c87df9de8a39f8a7d6ecd04b (diff)
new version of klm
Diffstat (limited to 'klm/util/mmap.hh')
-rw-r--r--klm/util/mmap.hh2
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);