java - -XX:+UseCompressedOops does not work in Eclipse -
my java (64bit) version information below:
d:\workspace\s3-jerome\voice\nlp>java -version java version "1.7.0_09" java(tm) se runtime environment (build 1.7.0_09-b05) java hotspot(tm) 64-bit server vm (build 23.5-b02, mixed mode)
my application has lot of instances, therefore consumes plenty of memory if each reference occupies 8 bytes. want use -xx:+usecompressedoops force jvm compress oop. in eclipse, have added -xx:+usecompressedoops in vm arguments in run configuration.
but when profile program visualvm 1.3.7, still result size of each reference 8 bytes. instance size of following class still 32!
public class aclinkedlist<e> { private e element; private aclinkedlist<e> next; public aclinkedlist(e element) { this.element = element; next = null; }; ....... }
anybody knows problem?
usecompressedoops
enabled default on hotspot 7 when appropriate (heap size not large).- jvisualvm not take setting account , reports erroneous data.
- you can convince of above running trivial java program , measuring heap occupancy
runtime.freememory()
,runtime.totalmemory()
.
Comments
Post a Comment