Java VM - does the freed memory return to the OS?(Java VM - 释放的内存是否返回到操作系统?)
问题描述
在 Java 运行时,如果我的应用程序释放内存,运行时是否会将内存释放回操作系统?还是回到我的流程?
In the Java runtime, if my application frees memory, does the runtime release the memory back to the OS? Or just back to my process?
推荐答案
这取决于JVM实现,规范中没有指定.
That depends on the JVM implementation and isn't specified in the specification.
Sun JVM 将保留它作为第一步.一旦分配的内存的某个(可配置)百分比未使用,它会将其中的一部分返回给操作系统(该行为受 MinHeapFreeRatio 和 MaxHeapFreeRatio 设置).
The Sun JVM will hold onto it as a first step. Once a certain (configurable) percentage of allocated memory is unused, it will return some of it to the OS (the behavior is influenced by the MinHeapFreeRatio and MaxHeapFreeRatio settings).
这篇关于Java VM - 释放的内存是否返回到操作系统?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!
本文标题为:Java VM - 释放的内存是否返回到操作系统?
基础教程推荐
- Struts2 URL 无法访问 2022-01-01
- 无法复制:“比较方法违反了它的一般约定!" 2022-01-01
- 存储 20 位数字的数据类型 2022-01-01
- 修改 void 函数的输入参数,然后读取 2022-01-01
- 问题http://apache.org/xml/features/xinclude测试日志4j 2 2022-01-01
- REST Web 服务返回 415 - 不支持的媒体类型 2022-01-01
- RabbitMQ:消息保持“未确认"; 2022-01-01
- 如何对 Java Hashmap 中的值求和 2022-01-01
- 使用堆栈算法进行括号/括号匹配 2022-01-01
- Spring AOP错误无法懒惰地为此建议构建thisJoinPoin 2022-09-13
