0 Replies Latest reply: Aug 29, 2012 5:12 PM by 958884 RSS

    Sometime java -Xmx parameter ignored by JRE (windows 32)


      I am observing some strange behavior when I try to use Xmx parameter using JRE on Windows Vista (4.0GB RAM) System .


      I am running one java program with parameter -Xmx512m

      java -Xmx512m MemCheck

      Within code I am just printing free memory, total memory and max memory using following functions


      I observed sometimes I am getting max memory is around 494MB and some times only 88MB.

      As per my understanding I should always get max memory as 494MB because I have already provided Xmx as 512MB. Also I am not running any memory consuming application on my system or any other java application.

      My application need some 400MB memory to run fluently. I observed this on one the Windows Vista(32 bit, 4GB RAM) machine on our lab. Never observed on any other machines with XP and Windows 7.

      Can anybody tell me reason behind this strange behavior ?