我使用CreateFileMapping,MapViewOfFile开的一个共享内存
能够同时被多少个进程读取,window2000下是否有限制.(在unix下面是有限制的)
有限制的话能够调整吗?用那个api来调整

解决方案 »

  1.   

    With one important exception, file views derived from a single file-mapping object are coherent, or identical, at a given time. If multiple processes have handles of the same file-mapping object, they see a coherent view of the data when they map a view of the file. 上文来自于MSDN,根据上文我们可以判断,连贯内存的大小限制了访问共享内存文件的访问数量:文件大小和容许的访问进程数量成反比,同样内存的大小和容许的访问进程数量成正比。
      

  2.   

    我开的内存是1万个
    class data
    {
    public:
    char id[32];
    char url[260];
    };
    能开多少个进程访问?我总不能开一百个程序来跑吧!呵呵