LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software > Linux - Kernel
User Name
Password
Linux - Kernel This forum is for all discussion relating to the Linux kernel.

Notices


Reply
  Search this Thread
Old 10-07-2009, 11:55 PM   #1
balainemb
LQ Newbie
 
Registered: Oct 2009
Posts: 2

Rep: Reputation: 0
Vsz memory size


I need a clarification in (Vsz)(virtual)Memory size. I have compiled a code.
on both 2.4 and 2.6 kernel based machine i386.
#include <stdio.h>
int main()
{
while(1)
seleep(1);
}

I have checked the size of the Vsz size in the 2.4 and 2.6 based machine. There is a huge difference. at first sight i could see the library versions are different but it should not create a huge difference.

I will paste the output of pmaps here in 2.4 and 2.6
below.
(Pmap o/p in 2.4)
08048000 (4 KB) r-xp (03:03 405625) /home/guest/bselvara/a.out
08049000 (4 KB) rw-p (03:03 405625) /home/guest/bselvara/a.out
40000000 (84 KB) r-xp (03:02 309509) /lib/ld-2.3.2.so
40015000 (4 KB) rw-p (03:02 309509) /lib/ld-2.3.2.so
40016000 (4 KB) rw-p (00:00 0)
40034000 (1228 KB) r-xp (03:02 309516) /lib/libc-2.3.2.so
40167000 (16 KB) rw-p (03:02 309516) /lib/libc-2.3.2.so
4016b000 (8 KB) rw-p (00:00 0)
bfffe000 (8 KB) rwxp (00:00 0)
mapped: 1360 KB writable/private: 44 KB shared: 0 KB


Pmap O/p in 2.6
0024c000 (88 KB) r-xp (fd:00 29295475) /lib/ld-2.3.4.so
00262000 (4 KB) r--p (fd:00 29295475) /lib/ld-2.3.4.so
00263000 (4 KB) rw-p (fd:00 29295475) /lib/ld-2.3.4.so
00266000 (1176 KB) r-xp (fd:00 29295492) /lib/tls/libc-2.3.4.so
0038c000 (8 KB) r--p (fd:00 29295492) /lib/tls/libc-2.3.4.so
0038e000 (8 KB) rw-p (fd:00 29295492) /lib/tls/libc-2.3.4.so
00390000 (8 KB) rw-p (00:00 0)
08048000 (4 KB) r-xp (00:29 2558191) /users/bselvara/test/a.out
08049000 (4 KB) rw-p (00:29 2558191) /users/bselvara/test/a.out
b7f56000 (4 KB) rw-p (00:00 0)
bfec6000 (1256 KB) rw-p (00:00 0)
ffffe000 (4 KB) ---p (00:00 0)
mapped: 2568 KB writable/private: 1284 KB shared: 0 KB



If i compare both the o/p ther is a difference of 1208 kb.

can any one please explain what is Vsz. Why is the difference.
How they calculate Vsz?

Iam facing same scenario in my project. initially on the project was running on 2.4 kernel and the vsz size occupied by the thread is just 20Mb now the same code adapted for powerpc arch with 2.6 kernel the size of vsz of the thread is 120 MB(approx). can some one explains why there is a huge increase in Vsz. Thanks in advance

regards,
Balamurugan
newbie

Last edited by balainemb; 10-08-2009 at 01:34 AM.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
tool to detect number of memory slots, memory module type, speed, and size stefanwolf Linux - Hardware 8 04-22-2013 09:48 AM
Good Memory Size and Moemory Size in lsconf output Jaimine AIX 3 05-18-2009 01:07 PM
Monitoring Memory, VSZ or RSS disordr Linux - Server 1 09-08-2008 09:51 PM
Why is VSZ more than RSS in ps aux even if I'm not using any swap? weijie90 Linux - Hardware 4 08-20-2008 06:02 PM
is shared memory expandable in memory size? Thinking Programming 4 08-16-2005 09:57 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software > Linux - Kernel

All times are GMT -5. The time now is 01:58 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration