• IPC出了点问题

    There are processes: the parent and the child, and the child is created by fork(). I use mmap() to implement IPC between the parent process and the child process, and there is a struct SharedMessage to be set to the shared memory. Here is its definition: ...
  • Linux共享内存段:Mutex断言错误

    我在Linux中有这两个使用共享内存的简单程序。 数据客户端: FILE *fp; fp = fopen("mem.share", "r"); if (fp<=0){ cout<<"Error, cannot open memory link file"<<endl; return -1; } int shmid; fscanf (fp, "%d", &shmid); fprintf(fp, "%d", shmid); fclose(fp); cout<<"Using the file ...
  • 在C shmget中查找共享内存的大小

    I was wondering if it is possible to obtain the size of a shared memory segment in C created from shmget without having the size of the segment as a part of the data? I'm trying to allocate a dynamic int array and need to find the size of the array in the ...
公告

欢迎访问 goshare  点击这里设置您的邮箱  可以接收站内跟帖、回复邮件提醒,不错过任何一条消息。

关注公众号订阅更多技术干货! 码农俱乐部