Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
是否可以更改已经打开的内存映射文件的名称,或者我是否需要关闭它,重命名它然后再次映射它?
在打开文件时重命名文件很好,无论它是否被映射。
在类 UNIX 系统中,文件本身的概念不同于名称(称为“链接”)。一个文件可能有零个、一个或多个单独的名称。当您打开文件时,您引用的是文件本身 - 可以更改或删除名称(并且文件将保持打开状态)。