Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Possibly don't need to use connections with files that don't end with newlines #357

Open
jimhester opened this issue Jul 14, 2021 · 0 comments
Labels
feature a feature request or enhancement

Comments

@jimhester
Copy link
Collaborator

If I am reading the POSIX spec correctly it allows you to mmap a file longer than the filename and guarantees the extra bytes until the next page will be zero padded. So you should be able to always mmap the file to file_size + 1 and guarantee it will end with a newline or zero byte.

https://unix.stackexchange.com/questions/616848/what-is-the-behaviour-of-a-file-backed-memory-map-when-reading-from-or-writing-t

@jimhester jimhester added the feature a feature request or enhancement label Nov 9, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature a feature request or enhancement
Projects
None yet
Development

No branches or pull requests

1 participant