找回密码
 注册
查看: 569|回复: 0

linux下的c----共享内存问题

[复制链接]
发表于 2003-11-20 12:35:45 | 显示全部楼层 |阅读模式
我用c语言在redhat9.0下用shmat函数.总是报errno=43.
一开始调用shmget返回shmid是0,后来我用ipcs命令发现我的共享内存(我的key=15,size=10)
------ Shared Memory Segments --------
key        shmid      owner      perms      bytes      nattch     status
0x00000002 65536      root      600        655360     2
0x00000000 229377     root      777        393216     2          dest
0x0000000f 393218     root      0          10         0
我后来重启动一开机变为
------ Shared Memory Segments --------
key        shmid      owner      perms      bytes      nattch     status
0x00000002 65536      root      600        655360     2

why?
您需要登录后才可以回帖 登录 | 注册

本版积分规则

GMT+8, 2025-2-23 10:47 , Processed in 0.020683 second(s), 16 queries .

© 2001-2025 Discuz! Team. Powered by Discuz! X3.5.

快速回复 返回顶部 返回列表