gpt4 book ai didi

java - MaxDirectMemorySize 用法

转载 作者:行者123 更新时间:2023-12-05 03:09:40 31 4
gpt4 key购买 nike

我使用的是 jdk1.8.0_92。我的虚拟机如下所示。

$java -version
java version "1.8.0_92"
Java(TM) SE Runtime Environment (build 1.8.0_92-b14)
Java HotSpot(TM) 64-Bit Server VM (build 25.92-b14, mixed mode)

我的 MaxDirectMemorySize jinfo 是

$jinfo -flag MaxDirectMemorySize 41266
-XX:MaxDirectMemorySize=0

但我不知道将为该 VM 分配多少直接内存。有人知道吗?

最佳答案

如果未明确指定 MaxDirectMemorySize,则默认限制将等于堆大小:Runtime.getRuntime().maxMemory() ( the source )。

关于java - MaxDirectMemorySize 用法,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/42153032/

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