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.

Right so I have a fun little thing that I'm deathly confuzzled about. I have a program that is running and I am getting the following:

using top:

 SIZE    RES
1639M   359M

using ps:

SZ
20171

Now this seems deathly wrong for me. I checked and a page does qualify as 4kb so it is not a problem with paging. Can anyone help me figure out why this is occuring? Thanks!

share|improve this question

1 Answer 1

up vote 1 down vote accepted

According to the manual:

ps(1) SZ is a measure of text, data, and stack pages in the process virtual address space. The unit of measure is one page. So ps(1) is reporting a virtual size of 82 620 416 bytes.

top(1) SIZE is a measure of text, data, stack, mmap regions, shared memory regions, and IO mapped regions in the process virtual address space. The unit of measure (M) is one megabyte. So top(1) is reporting a virtual size of 1 718 616 064 bytes.

Is the process perhaps mapping a 1.5 Gb file?

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.