惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

Apple Machine Learning Research
Apple Machine Learning Research
Exploit-DB.com RSS Feed
Exploit-DB.com RSS Feed
S
Security @ Cisco Blogs
cs.CV updates on arXiv.org
cs.CV updates on arXiv.org
Cisco Talos Blog
Cisco Talos Blog
Cyberwarzone
Cyberwarzone
SecWiki News
SecWiki News
Webroot Blog
Webroot Blog
L
LINUX DO - 最新话题
V
Vulnerabilities – Threatpost
T
Troy Hunt's Blog
Cloudbric
Cloudbric
L
LINUX DO - 热门话题
Google DeepMind News
Google DeepMind News
H
Heimdal Security Blog
S
Schneier on Security
NISL@THU
NISL@THU
The Hacker News
The Hacker News
Attack and Defense Labs
Attack and Defense Labs
A
Arctic Wolf
V2EX - 技术
V2EX - 技术
Security Latest
Security Latest
AWS News Blog
AWS News Blog
Scott Helme
Scott Helme
W
WeLiveSecurity
S
Secure Thoughts
Y
Y Combinator Blog
GbyAI
GbyAI
H
Hackread – Cybersecurity News, Data Breaches, AI and More
博客园 - Franky
量子位
人人都是产品经理
人人都是产品经理
雷峰网
雷峰网
K
Kaspersky official blog
P
Privacy & Cybersecurity Law Blog
T
Tenable Blog
The GitHub Blog
The GitHub Blog
cs.CL updates on arXiv.org
cs.CL updates on arXiv.org
J
Java Code Geeks
Vercel News
Vercel News
Recent Commits to openclaw:main
Recent Commits to openclaw:main
Schneier on Security
Schneier on Security
云风的 BLOG
云风的 BLOG
小众软件
小众软件
Engineering at Meta
Engineering at Meta
宝玉的分享
宝玉的分享
C
CERT Recently Published Vulnerability Notes
Security Archives - TechRepublic
Security Archives - TechRepublic
C
CXSECURITY Database RSS Feed - CXSecurity.com
P
Palo Alto Networks Blog

博客园 - bluesky4485

Elasticsearch及java客户端jest使用 在windows环境下基于sublime text3的node.js开发环境搭建 CentOS6.4安装及配置oracle Ant学习 Springframework3.1源码编译 win7x64下安装oraclex64版本后,plsql Developer无法登录的问题 VMWare安装redhat9后上网的的问题 Tomcat中部署后JspFactory报异常的解决方案 MyEclipse10 中增加svn插件 Oracle连接池信息的修改 OPDS1.1 VMware下Redhat9鼠标选用usb后不能使用的解决办法 m2e插件安装 Java开发Maven环境配置和介绍 javadoc生成出现错误“编码 GBK 的不可映射字符” Google常用搜索技巧 设置Google不跳转到google.com.hk CodeSmith支持中文配置 jni和C++通信中文乱码的问题
如何测试java支持的最大内存
bluesky4485 · 2012-07-18 · via 博客园 - bluesky4485

JDK在不同的操作系统中支持的最大内存不一样,可以采用如下方法来测试不同操作系统中支持的最大内存。

c:>java -XmxXXXXm(g) -version

其中XXXX为最大内存数,m(g)是内存的计量单位,在以上命令中将XXXX写为具体数字,根据情况采用m或g为单位,如果命令能正确显示出jdk的版本信息,则说明当前jdk支持XXXX的最大内存,如果不能正确显示出版本信息则表示超出了jdk支持的最大值。

例如:

C:\Users\Administrator>java -Xmx1G -version
java version "1.6.0_33"
Java(TM) SE Runtime Environment (build 1.6.0_33-b03)
Java HotSpot(TM) 64-Bit Server VM (build 20.8-b03, mixed mode)

则表示当前jdk支持1G的内存。可以通过XXXX的值的增大来慢慢测试jdk所支持的最大的内存。

一般在32位机器上,该最大值位于1.5G-2G之间,在64位机器上面应该没啥限制,经测试写9G也能正常得出版本信息。