0

我正在尝试在服务器(RedPitaya)和客户端(ubuntu 虚拟机)上运行此代码。

该程序在具有 root 权限的客户端上运行时返回以下错误消息:

root@VirtualBox:/.../rp_remote_acquire# ./rp_remote_acquire -m 1 -a 192.169.1.100 -p 5000 -k 0 -c 0 -d 64
mmap scope io failed (non-fatal), 1
mmap scope ddr a failed (non-fatal), 1
Segmentation fault (core dumped)

我不确定分段错误是否与前两个错误有关,因为我只在服务器运行时遇到分段错误...

错误似乎来自这里:

if (param->mapped_io == MAP_FAILED) {
    fprintf(stderr, "mmap scope io failed (non-fatal), %d\n", errno);
    param->mapped_io = NULL;
}

我知道在 stackoverflow 上已经解决了类似的问题。

我试过了

sysctl dev.mem.restricted

我尝试添加

linux   /boot/vmlinuz-linux iomem=relaxed

到结束

/boot/grub/grub.cfg

并重新启动,但问题仍然存在......

我想允许这个程序访问计算机的虚拟内存,从而解决所有的错误。很可能是我没有正确设置内核参数。

有人可以指出我正确的方向吗?

4

0 回答 0