I am running a java server program to which i have assigned 4096M RAM but it shows memory as below in top command .
PID USER      PR  NI    VIRT    RES    SHR S  %CPU  %MEM     TIME+ COMMAND
1512384 root      20   0   12.8g   5.3g  38912 S   3.6  11.2 245:33.64 /usr/java/jre/bin/java
it is showing residential memory as 5.3g and virtual as 12.8 , why this is so. these are higher than assigned memory of 4G