From owner-freebsd-net Sun Jul 7 12:36:33 2002 Delivered-To: freebsd-net@freebsd.org Received: from mx1.FreeBSD.org (mx1.FreeBSD.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id AA95937B400 for ; Sun, 7 Jul 2002 12:36:30 -0700 (PDT) Received: from patrocles.silby.com (d85.as13.nwbl0.wi.voyager.net [169.207.135.213]) by mx1.FreeBSD.org (Postfix) with ESMTP id 5DB9C43E09 for ; Sun, 7 Jul 2002 12:36:29 -0700 (PDT) (envelope-from silby@silby.com) Received: from patrocles.silby.com (localhost [127.0.0.1]) by patrocles.silby.com (8.12.4/8.12.4) with ESMTP id g67Jdtcv014254; Sun, 7 Jul 2002 14:39:55 -0500 (CDT) (envelope-from silby@silby.com) Received: from localhost (silby@localhost) by patrocles.silby.com (8.12.4/8.12.4/Submit) with ESMTP id g67JdrBO014251; Sun, 7 Jul 2002 14:39:54 -0500 (CDT) X-Authentication-Warning: patrocles.silby.com: silby owned process doing -bs Date: Sun, 7 Jul 2002 14:39:53 -0500 (CDT) From: Mike Silbersack To: Alfred Perlstein Cc: net@freebsd.org Subject: Re: the incredible shrinking socket In-Reply-To: <20020707083710.GM97638@elvis.mu.org> Message-ID: <20020707143846.A13771-100000@patrocles.silby.com> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-net@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org On Sun, 7 Jul 2002, Alfred Perlstein wrote: > Some time ago I noticed that there appeared to be several members > of struct socket that were either only used by listen sockets or > only used by data sockets. > > I've taken a stab at unionizing the members and we wind up saving > 28 bytes per socket on i386, and probably nearly double that on > any 64 bit platform. That's ~15%, which isn't too shabby. Unions are ooogly. Would it be possible to seperate listen-only structures out into a seperate struct instead with a pointer to it? Mike "Silby" Silbersack To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-net" in the body of the message