在JAVA中,有两种JVM(在同一台物理机器上运行)使用/共享相同的存储地址空间吗?假设JVM1中的生产者将消息放在特定的预定义内存位置,如果它知道要查看哪个内存位置,JVM2上的消费者是否可以检索消息?
从man页面,
MAP_ANONYMOUS
The mapping is not backed by any file; its contents are initialized to zero. The fd and offset arguments are ignored; however, some implementations require
fd to be -1 if MAP_ANONYMOUS (or MAP_ANON) is specified, and portable applications should ensure this. The use of MAP_ANONYMOUS in conjunction with
MAP_SHARED is only supported on Linux since kernel 2.4.
Run Code Online (Sandbox Code Playgroud)
使用目的是MAP_ANONYMOUS什么?任何一个例子都会很好.还要从哪里映射内存?
在man页面上写的The use of MAP_ANONYMOUS in conjunction with MAP_SHARED is only supported on Linux …