Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 9 Dec 1999 14:38:07 +0300 (MSK)
From:      Artem Koutchine <matrix@gerpa.ru>
To:        questions@freebsd.org
Subject:   MEMORY usage by programs
Message-ID:  <Pine.BSF.3.95q.991209142850.21330A-100000@gerpa.ru>

next in thread | raw e-mail | index | archive | help
Well, here is what I do.

I compile a very simple proggie using cc on FreeBSD 3.1

main {
	while(1){;} /* make it a processor hog :)*/
}

Now, i run it and also run top
I see:
SIZE: 748K
RES 208K


Basically, it means that thius little proggie takes up
748 of my memory? This is really abnormal. The problem is
that i can't really understand the given number. Does it mean
that this little proggie takes 748K in memory or only 208K?
Anyway even if it took 60K it still would be unacceptable
for this example. It should be Really really small. Can anybody
explain to me how so librries are used when running, how
do i understand given numbers, and how do i reduce the size of
the program in memory (core memory for that matter)?

Regards,
Artem



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?Pine.BSF.3.95q.991209142850.21330A-100000>