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 - 释放的内存是否返回到操作系统?
基础教程推荐
- 控制台应用程序中的 Java 键盘输入解析 2022-01-01
- 将 double 转换为 Int,向下舍入 2022-01-01
- 在java中使用xpath和selenium解析HTML表格数据 2022-01-01
- Java ECDSAwithSHA256 签名长度不一致 2022-01-01
- 将 Windows 证书导入 Java 2022-01-01
- 在springboot中如何给mybatis加拦截器 2023-04-29
- 如何在相机中应用自定义滤镜 [Surfaceview 预览]. 2022-01-01
- Maven:无效的目标版本:10 2022-01-01
- JPA惰性列表上的流 2022-01-01
- doFilter()是在servlet的工作完成之前还是之后执行的? 2022-01-01
