提交 23573509 编写于 作者: R Rich Felker

support posix_madvise (previous a stub)

the check against MADV_DONTNEED to because linux MADV_DONTNEED
semantics conflict dangerously with the POSIX semantics
上级 1c76683c
#define _GNU_SOURCE
#include <sys/mman.h>
int posix_madvise(void *addr, size_t len, int advice)
{
return 0;
if (advice == MADV_DONTNEED) return 0;
return -__syscall(SYS_madvise, addr, len, advice);
}
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册