gpt4 book ai didi

Java内存映射文件?

转载 作者:塔克拉玛干 更新时间:2023-11-03 03:32:07 26 4
gpt4 key购买 nike

Java 中的内存映射文件是否类似于 Windows 中的内存映射文件?还是只是基于Java中内存和文件常用操作的仿真?

最佳答案

它使用操作系统对内存映射文件的支持。

我正在尝试寻找文档来支持这一点,但我还没有找到任何定论。然而,文档的各个部分确实是这样说的:

Many of the details of memory-mapped files are inherently dependent upon the underlying operating system and are therefore unspecified. The behavior of this method when the requested region is not completely contained within this channel's file is unspecified. Whether changes made to the content or size of the underlying file, by this program or another, are propagated to the buffer is unspecified. The rate at which changes to the buffer are propagated to the file is unspecified.

如果一切都只是模拟,就不需要这种未指定的行为。

关于Java内存映射文件?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/4261603/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com