From owner-freebsd-questions Sun Jan 21 7:48:28 2001 Delivered-To: freebsd-questions@freebsd.org Received: from guru.mired.org (okc-65-26-235-186.mmcable.com [65.26.235.186]) by hub.freebsd.org (Postfix) with SMTP id 26D8D37B400 for ; Sun, 21 Jan 2001 07:48:10 -0800 (PST) Received: (qmail 76037 invoked by uid 100); 21 Jan 2001 15:48:09 -0000 From: Mike Meyer MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-ID: <14955.1209.195848.394006@guru.mired.org> Date: Sun, 21 Jan 2001 09:48:09 -0600 (CST) To: Gustavo Vieira Goncalves Coelho Rios Cc: questions@freebsd.org Subject: Re: small program eats lot of memory In-Reply-To: <91061222@toto.iv> X-Mailer: VM 6.75 under 21.1 (patch 10) "Capitol Reef" XEmacs Lucid X-face: "5Mnwy%?j>IIV\)A=):rjWL~NB2aH[}Yq8Z=u~vJ`"(,&SiLvbbz2W`;h9L,Yg`+vb1>RG% *h+%X^n0EZd>TM8_IB;a8F?(Fb"lw'IgCoyM.[Lg#r\ Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG Gustavo Vieira Goncalves Coelho Rios types: > I compiled and executed a small program and it's eating about 336 of > real memory (rss) and 840 of virtual size memory (vsz), may some one > explain why a simple program eats about 1 MB of memory? You linked it shared, right? That 1MB includes all of every shared library it uses, whether it uses those functions or not. Linking it static will make it noticably smaller - but that still drags in some fairly large chunks of the standard IO library. http://www.mired.org/home/mwm/ Independent WWW/Perforce/FreeBSD/Unix consultant, email for more information. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message