From owner-freebsd-current Wed Oct 30 12:46:16 2002 Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id E5F1437B401 for ; Wed, 30 Oct 2002 12:46:14 -0800 (PST) Received: from rootlabs.com (root.org [67.118.192.226]) by mx1.FreeBSD.org (Postfix) with SMTP id 95AE443E7B for ; Wed, 30 Oct 2002 12:46:14 -0800 (PST) (envelope-from nate@rootlabs.com) Received: (qmail 91642 invoked by uid 1000); 30 Oct 2002 20:46:15 -0000 Date: Wed, 30 Oct 2002 12:46:15 -0800 (PST) From: Nate Lawson To: current@freebsd.org Subject: libc size Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG After a discussion on cvs-all regarding size of our libc, I wrote a quick script to see where the problems are. A cursory glance at its output shows there are numerous things we can improve, including: * setproctitle(3) uses 4k of static scratch buffers when it could allocate these on the stack (let alone reducing the length of the proc title to something more reasonable than 2k). * vfwprintf and vfprintf are near duplicates of each other (in fact, the former is derived from the latter). Each uses 14k of text so this could be split in half by combining them and selecting different behavior with a flag. Here is a link to the size of various components of libc, sorted by text size. If you can find some way to reduce or even remove some of this, please submit a patch. http://www.root.org/~nate/freebsd/lib_size.out -Nate To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message