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

Set randomAccess=true on LOAD. #4

Merged
merged 5 commits into from
Mar 22, 2024

Conversation

jpountz
Copy link

@jpountz jpountz commented Mar 22, 2024

No description provided.

@@ -90,6 +90,9 @@ private IOContext(boolean readOnce, boolean load, boolean randomAccess) {
if (readOnce && randomAccess) {
throw new IllegalArgumentException("cannot be both readOnce and randomAccess");
}
if (load && randomAccess == false) {
throw new IllegalArgumentException("cannot be load but not randomAccess");

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks right to me. ++

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Trivially, maybe add something like this to the javadoc for load:

If this flag is set, then randomAccess will be true.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good call, done.

jpountz and others added 3 commits March 22, 2024 11:15
… use are Poxix only. On Windows we can have a totally different way to madvise the kernel
@jpountz
Copy link
Author

jpountz commented Mar 22, 2024

@uschindler Would you like to take a look?

@uschindler
Copy link
Owner

I fixed the conflict. Sorry for force-pushing the main PR. I was not aware that you were working.

@uschindler uschindler merged commit 1e4c5c3 into uschindler:dev/posix_madvise Mar 22, 2024
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.

3 participants