From owner-freebsd-commit Thu Nov 9 01:01:47 1995 Return-Path: owner-commit Received: (from root@localhost) by freefall.freebsd.org (8.6.12/8.6.6) id BAA27678 for freebsd-commit-outgoing; Thu, 9 Nov 1995 01:01:47 -0800 Received: (from root@localhost) by freefall.freebsd.org (8.6.12/8.6.6) id BAA27663 for cvs-all-outgoing; Thu, 9 Nov 1995 01:01:42 -0800 Received: (from root@localhost) by freefall.freebsd.org (8.6.12/8.6.6) id BAA27652 for cvs-sys-outgoing; Thu, 9 Nov 1995 01:01:37 -0800 Received: from tfs.com (tfs.com [140.145.250.1]) by freefall.freebsd.org (8.6.12/8.6.6) with SMTP id BAA27646 ; Thu, 9 Nov 1995 01:01:31 -0800 Received: from critter.tfs.com by tfs.com (smail3.1.28.1) with SMTP id m0tDSrR-0003wCC; Thu, 9 Nov 95 01:01 PST Received: from localhost (localhost [127.0.0.1]) by critter.tfs.com (8.6.11/8.6.9) with SMTP id IAA06137; Thu, 9 Nov 1995 08:42:17 +0100 X-Authentication-Warning: critter.tfs.com: Host localhost didn't use HELO protocol To: Bruce Evans cc: CVS-commiters@freefall.freebsd.org, cvs-sys@freefall.freebsd.org Subject: Re: cvs commit: src/sys/kern kern_sysctl.c In-reply-to: Your message of "Thu, 09 Nov 1995 06:59:41 +1100." <199511081959.GAA07042@godzilla.zeta.org.au> Date: Thu, 09 Nov 1995 08:42:16 +0100 Message-ID: <6135.815902936@critter.tfs.com> From: Poul-Henning Kamp Sender: owner-commit@FreeBSD.org Precedence: bulk > >> Linker sets are very old technology. They are useful for static linking > >> and configuration, but we're trying to get away from those. Consider an > >>... > >Well, how would you dynamically add something to a switch() {} ? > > Not :-). The switches would have to be replaced by a table lookup. Well, this does the same thing. Dynamic addition: I have two empty entires in each linkerset (one is the NULL and one is the dummy I have to stick there to make sure the linker_set exists :-< ) I will use those two, and after than simply malloc a new piece of mem and copy the contents of the linkerset into it. > I'm surprised that you found a lot of storage wasted. I would have thought > that there aren't enough sysctl variables to matter. There aren't many > because they were too hard to add :-). Well, I didn't find a lot of storage wasted, but I didn't want to make sysctl bloated so that we would waste it later either. I think I have found a good compromise. -- Poul-Henning Kamp | phk@FreeBSD.ORG FreeBSD Core-team. http://www.freebsd.org/~phk | phk@login.dknet.dk Private mailbox. whois: [PHK] | phk@ref.tfs.com TRW Financial Systems, Inc. Future will arrive by its own means, progress not so.