commit | 11852e5c2211a42adcc59e44fa5d74bc19bfac82 | [log] [tgz] |
---|---|---|
author | Adam Paszke <adam.paszke@gmail.com> | Tue Sep 06 10:35:34 2016 -0700 |
committer | Adam Paszke <adam.paszke@gmail.com> | Tue Sep 06 10:35:34 2016 -0700 |
tree | 325a06ce0359aea9f21d1d76f23b42ac02a5e16b | |
parent | 4a1e099974f510a10d29b8e19b91edbe7a47f065 [diff] |
Add new flags for THMapAllocator * TH_ALLOCATOR_MAPPED_FROMFD uses an existing file descriptor for mapping (and steals it) * TH_ALLOCATOR_MAPPED_KEEPFD doesn't close the file descriptor until the mapping is freed * TH_ALLOCATOR_MAPPED_UNLINK unlinks the file immediately after mapping it to memory Also, now it's using fstat to check the file size (instead of lseek, which alters the fd state).