摘要: 共享内存-进程间通信 基本流程 创建/打开 一块共享内存空间 将共享内存映射到用户进程空间 操作 解除映射 销毁共享内存 创建共享内存源码 #include <stdio.h> #include <sys/shm.h> #include <unistd.h> #include <string.h> 阅读全文
posted @ 2021-11-05 14:59 roverqqq 阅读(79) 评论(0) 推荐(0)
摘要: 无名管道源码 #include <stdio.h> #include <unistd.h> #include <string.h> #include <errno.h> int main() { int fd[2]; char buf[1024]; memset(buf,'\0',sizeof(bu 阅读全文
posted @ 2021-11-05 14:11 roverqqq 阅读(69) 评论(0) 推荐(0)