From owner-freebsd-questions Thu Dec 9 3:30:13 1999 Delivered-To: freebsd-questions@freebsd.org Received: from gerpa.ru (gerpa.ru [212.24.32.162]) by hub.freebsd.org (Postfix) with ESMTP id 99F8C155DA for ; Thu, 9 Dec 1999 03:30:05 -0800 (PST) (envelope-from matrix@gerpa.ru) Received: from localhost (matrix@localhost) by gerpa.ru (8.9.3/8.9.3) with SMTP id OAA21489 for ; Thu, 9 Dec 1999 14:38:07 +0300 (MSK) Date: Thu, 9 Dec 1999 14:38:07 +0300 (MSK) From: Artem Koutchine To: questions@freebsd.org Subject: MEMORY usage by programs Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG 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