mcctrl: use zap_page_range() instead of madvise()

This commit is contained in:
NAKAMURA Gou
2016-02-24 21:14:48 +09:00
parent a713c2fcaa
commit 2601d8a36f
3 changed files with 19 additions and 12 deletions

View File

@ -1842,17 +1842,12 @@ int main_loop(int fd, int cpu, pthread_mutex_t *lock)
return w.sr.args[0];
case __NR_mmap:
case __NR_munmap:
case __NR_mprotect:
/* reserved for internal use */
do_syscall_return(fd, cpu, -ENOSYS, 0, 0, 0, 0);
break;
case __NR_munmap:
ret = madvise((void *)w.sr.args[0], w.sr.args[1], MADV_DONTNEED);
SET_ERR(ret);
do_syscall_return(fd, cpu, ret, 0, 0, 0, 0);
break;
#ifdef USE_SYSCALL_MOD_CALL
case 303:{
__dprintf("mcexec.c,mod_cal,mod=%ld,cmd=%ld\n", w.sr.args[0], w.sr.args[1]);