Date: Thu, 11 Jul 2002 14:31:43 -0400 (EDT) From: Andrew Gallatin <gallatin@cs.duke.edu> To: Alfred Perlstein <bright@mu.org> Cc: net@freebsd.org Subject: Re: the incredible shrinking socket Message-ID: <15661.53007.18632.609465@grasshopper.cs.duke.edu> In-Reply-To: <20020707083710.GM97638@elvis.mu.org> References: <20020707083710.GM97638@elvis.mu.org>
next in thread | previous in thread | raw e-mail | index | archive | help
Alfred Perlstein writes: > 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. > Speaking of 64-bit platforms: While you are shrinking sockets, can you change the longs in struct sockbuf into ints? I see no reason to use 64-bit longs for those fields. That should dramatically shrink a socket on 64-bit platforms. Thanks, Drew To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-net" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?15661.53007.18632.609465>