mmap設備方法筆記

mmap系統調用(功能) void*mmap(void*addr,size_tlen,intprot,intflags,intfd,off_toffset) 參數: addr 指定映射的起始地址(通常不指定)通常爲NULL,由系統指定 length 映射到內存的文件長度 prot 映射區的保護方式: PROT_EXEC:映射區可被執行 PROT_READ:映射區可被讀取 PROTWRITE:映射區
相關文章
相關標籤/搜索