日期:2014-05-16  浏览次数:20602 次

问个关于共享内存的问题,谢谢
函数:shmget(key_t,key,size_t size,int flag),这个函数它的键值key,与它的返回值ID有什么联系与区别?为什么不直接返回它的键值key呢?

------解决方案--------------------
The identifier is an internal name for an IPC object. Cooperating processes need an external naming scheme to be able to rendezvous using the same IPC object. For this purpose, an IPC object is associated with a key that acts as an external name.
------解决方案--------------------
KEY 是一个东西的客观描述
描述符 是这个东西的主观印象