Mmap问题-> segfault
|
我想分享使用mmap。但是它不起作用,因为我遇到了段错误:
int fdL = open(\"/dev/zero\", O_RDWR | O_CREAT);
int *ligneC = (int *) mmap(0, sizeof (int), PROT_READ | PROT_WRITE, MAP_SHARED, fdL, 0);
*ligneC = 0;
我哪里错了?
没有找到相关结果
已邀请:
1 个回复
曝匿弄罚