vmtouch icon indicating copy to clipboard operation
vmtouch copied to clipboard

evict not work with gcc -O0

Open pukaifei opened this issue 5 years ago • 0 comments

  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 !

pukaifei avatar Dec 03 '20 09:12 pukaifei