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

evict not work with gcc -O0 #89

Open
pukaifei opened this issue Dec 3, 2020 · 0 comments
Open

evict not work with gcc -O0 #89

pukaifei opened this issue Dec 3, 2020 · 0 comments

Comments

@pukaifei
Copy link

pukaifei commented Dec 3, 2020

  1. If vmtouch.c is compiled with gcc -O2, evict succeeds by calling posix_fadvise.
    But with gcc -O0, evict fails and mincore shows that memory is still used.
    What's the difference between -O2 and -O0 for posix_fadvise ?

  2. If use mmap, mlock, munlock sequentially, then call posix_fadvise and mincore shows that memory is still used.
    If mlock and munlock is skipped, posix_fadvise succeeds.
    I know that posix_fadivse is async, but how does lock affects it ?

Thanks !

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

No branches or pull requests

1 participant