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

Fix #56: pread() has a smaller size limit than read() on Linux #57

Merged
merged 1 commit into from Jun 6, 2018
Merged

Fix #56: pread() has a smaller size limit than read() on Linux #57

merged 1 commit into from Jun 6, 2018

Conversation

niklas88
Copy link
Member

@niklas88 niklas88 commented Jun 5, 2018

pread() has a size limit around 2.5 GB on Linux see
here

While a bit weird on 64 bit systems checking the actually read number of bytes
is probably a good idea anyway. While we are here clean up getLastOffset()
and remove unused (except for its test) getTrailingOffT() which did pretty
much the same with a copy of the code but returning the read offset
directly. This also gets rid of a two more seek() (except for getting the
file size). More cleanup is likely needed.

`pread()` has a size limit around 2.5 GB on Linux see
[here](https://stackoverflow.com/questions/36565209/pread-for-very-large-files)

While a bit weird on 64 bit systems checking the actually read number of bytes
is probably a good idea anyway. While we are here clean up `getLastOffset()`
and remove unused (except for its test) `getTrailingOffT()` which did pretty
much the same with a copy of the code but returning the read offset
directly. This also gets rid of a two more `seek()` (except for getting the
file size). More cleanup is likely needed.
@floriankramer floriankramer merged commit 0458b2a into ad-freiburg:master Jun 6, 2018
@niklas88 niklas88 deleted the fix_read_at_offset branch October 31, 2018 09:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants