Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

When we run top command it shows all the processes information. But under VIRT column there is m written against some values what does that m represents, is it MB . If yes then why it is only showing 12k in SWAP Header. Because if we do total the size is much much more than 12k.

top - 15:43:19 up 3 days, 55 min,  2 users,  load average: 0.01, 0.08, 0.08
Tasks: 259 total,   1 running, 258 sleeping,   0 stopped,   0 zombie
Cpu(s):  1.7%us,  0.3%sy,  0.0%ni, 97.8%id,  0.0%wa,  0.0%hi,  0.1%si,  0.0%st
Mem:   8177292k total,  6988680k used,  1188612k free,   417064k buffers
Swap:  8385920k total,       12k used,  8385908k free,  4535416k cached

  PID USER      PR  NI  VIRT  RES  SHR S %CPU %MEM    TIME+  COMMAND
29948 oracle    18   0  898m 269m  41m S 14.6  3.4   1:28.77 java
29947 oracle    18   0  863m 203m  34m S  1.3  2.5   0:51.60 java
29912 oracle    18   0  405m 199m  18m S  0.0  2.5   1:57.79 java
29943 oracle    18   0  376m 148m  19m S  0.0  1.9   0:18.00 java
29909 oracle    18   0  821m 104m  27m S  0.0  1.3   0:13.91 java
31008 oracle    15   0  512m  91m  28m S  0.0  1.1   0:10.28 java
30245 oracle    15   0  559m  82m  19m S  0.0  1.0   0:11.70 rwserver
29945 oracle    18   0  296m  68m  18m S  0.0  0.9   0:29.24 java
29961 oracle    17   0  298m  66m  18m S  0.0  0.8   0:10.32 java
30341 oracle    15   0  554m  64m  24m S  0.0  0.8   0:08.26 java
29936 oracle    18   0  302m  61m  16m S  0.3  0.8   0:08.25 java
 2543 oracle    15   0  553m  60m  24m S  0.0  0.8   0:04.45 java
 8546 oracle    25   0  367m  56m  13m S  0.0  0.7   0:19.78 emagent
29942 oracle    17   0  307m  56m  18m S  0.0  0.7   0:08.00 java
29946 oracle    18   0  293m  53m  16m S  0.0  0.7   0:08.58 java
32324 oracle    15   0  361m  51m  22m S  0.0  0.6   0:03.21 frmweb
29905 oracle    18   0  290m  48m  15m S  0.0  0.6   0:06.02 java
 5014 oracle    15   0  355m  45m  23m S  0.0  0.6   0:02.16 frmweb
 1135 oracle    15   0  355m  44m  22m S  0.0  0.6   0:01.90 frmweb
 4280 oracle    15   0  355m  44m  22m S  0.0  0.6   0:01.35 frmweb
 6727 oracle    15   0  353m  42m  22m S  0.0  0.5   0:00.84 frmweb
31043 oracle    16   0  452m  42m  12m S  0.0  0.5   0:03.01 java
29944 oracle    18   0  279m  42m  15m S  0.0  0.5   0:05.30 java
29941 oracle    15   0 98716  40m 4356 S  0.0  0.5   0:20.50 webcached
 8682 oracle    15   0 72536  29m  12m S  0.0  0.4   0:01.59 frmweb
share|improve this question

1 Answer 1

Virtual addresses are only backed by physical memory and swap when required. A process is welcome to allocate as much memory as it likes, and the system is welcome to not actually give it that memory until it is needed. See the malloc(3) man page, NOTES section for details.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.