Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 11 May 2000 01:49:50 -0600
From:      Chris Fedde <chris@fedde.littleton.co.us>
To:        Gustavo Vieira Goncalves Coelho Rios <kernel@tdnet.com.br>
Cc:        freebsd-questions@FreeBSD.ORG
Subject:   Re: small program is eating my memory. 
Message-ID:  <200005110749.e4B7noD00456@fedde.littleton.co.us>
In-Reply-To: <391A2CC2.383E1BCE@tdnet.com.br> 

next in thread | previous in thread | raw e-mail | index | archive | help
On Thu, 11 May 2000 03:45:06 +0000  Gustavo Vieira Goncalves Coelho Rios wrote:
 +------------------
 | While playing a little bit with C, i realized that even small C programs
 | eat too much memory.
 | May you, kindly, explaim me what is happenning?  How can i optimize it?
 | I think here is eating too much memory.
 +------------------

cute little critter. The RSS reported by ps is the kernels idea for 
the working set for the process.  It includes loader and exit
code, bindings for shared libraries, and some other fluff and overhead.
Static binding changes things a bit.

    gcc -static a.c
    ./a.out 1
    psg a.out
    cfedde   439  0.0  0.1   188   80  p7  R+    1:46AM   0:00.02 ./a.out 1

chris


--
    Chris Fedde
    303 773 9134


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-questions" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200005110749.e4B7noD00456>