Date: Thu, 09 Nov 1995 08:42:16 +0100 From: Poul-Henning Kamp <phk@critter.tfs.com> To: Bruce Evans <bde@zeta.org.au> Cc: CVS-commiters@freefall.freebsd.org, cvs-sys@freefall.freebsd.org Subject: Re: cvs commit: src/sys/kern kern_sysctl.c Message-ID: <6135.815902936@critter.tfs.com> In-Reply-To: Your message of "Thu, 09 Nov 1995 06:59:41 %2B1100." <199511081959.GAA07042@godzilla.zeta.org.au>
next in thread | previous in thread | raw e-mail | index | archive | help
> >> 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.
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?6135.815902936>
