Open MeiK2333 opened 5 years ago
https://meik2333.com/2018/08/16/%E5%85%B3%E4%BA%8E-mmap-%E6%98%A0%E5%B0%84%E7%9A%84%E5%86%85%E5%AD%98%E7%9A%84%E9%87%8A%E6%94%BE%E9%97%AE%E9%A2%98/
123#include <sys/mman.h>void mmap(void addr, size_t len, int prot, int flag, int fd, off_t off);// 若执行成功, 则返回映射区的起始地址;若出错,则返回 MAP_FAILED 。
MAP_FAILED
https://meik2333.com/2018/08/16/%E5%85%B3%E4%BA%8E-mmap-%E6%98%A0%E5%B0%84%E7%9A%84%E5%86%85%E5%AD%98%E7%9A%84%E9%87%8A%E6%94%BE%E9%97%AE%E9%A2%98/
123#include <sys/mman.h>void mmap(void addr, size_t len, int prot, int flag, int fd, off_t off);// 若执行成功, 则返回映射区的起始地址;若出错,则返回
MAP_FAILED
。