Linux - SoftwareThis forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Introduction to Linux - A Hands on Guide
This guide was created as an overview of the Linux Operating System, geared toward new users as an exploration tour and getting started guide, with exercises at the end of each chapter.
For more advanced trainees it can be a desktop reference, and a collection of the base knowledge needed to proceed with system and network administration. This book contains many real life examples derived from the author's experience as a Linux system and network administrator, trainer and consultant. They hope these examples will help you to get a better understanding of the Linux system and that you feel encouraged to try out things on your own.
Click Here to receive this Complete Guide absolutely free.
I am running following program on RHEL 3 and RHEL 4 machines and seeing major difference in memory usage by the program. It takes roughly 830KB on RHEL 3 and between 3MB to 4MB on RHEL 4. Surprisingly RHEL 4 memory usage changes at every run.
My RHEL 3 machine is
Linux torlcc06 2.4.21-9.ELsmp #1 SMP Thu Jan 8 17:08:56 EST 2004 i686 i686 i386 GNU/Linux
and RHEL 4 machine is
Linux torlce06 2.6.9-55.ELsmp #1 SMP Fri Apr 20 17:03:35 EDT 2007 i686 i686 i386 GNU/Linux
I am using gcc-3.3.3 for compilation.
My test program code looks like:
std::cout << std::setprecision(8);
std::cout << "proc size at start = " << getProcSize() << std::endl;
double* p = NULL;
for (int i = 0; i < 20; i++)
p = new double;
std::cout << "proc size at end = " << getProcSize() << std::endl;
First, do you use gcc-3.3.3 on both machines?
Are you running the program on the machine it was compiled on or do you compile on one machine and run that binary on both?
RHEL 3 = 2.4.* kernel
RHEL 4 = 2.6.* kernel
This is a pretty big change and I can think of a few reasons for the discrepancy.
- 2.6 kernel libraries that you are using may be larger than the 2.4 versions.
- 2.6 kernel may report its memory usage differently than 2.4.
- you may be running a binary compiled on 2.4 machine on the 2.6 machine or vice versa.
Yes I tried to compile test program both on RHEL 3 and 4 and run on both. I used same binary to run on both platform. I am little doubtful about kernel library size, as this difference shows up in gigs in our application.