Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 9 Nov 1995 06:59:41 +1100
From:      Bruce Evans <bde@zeta.org.au>
To:        bde@zeta.org.au, phk@critter.tfs.com
Cc:        CVS-commiters@freefall.freebsd.org, cvs-sys@freefall.freebsd.org
Subject:   Re: cvs commit: src/sys/kern kern_sysctl.c
Message-ID:  <199511081959.GAA07042@godzilla.zeta.org.au>

next 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.

>> think it is better for the primitive operations to be addition and
>> removal operations on a tree.  The `sysctl_' linker set would just
>> give a list of things to be added to the tree initially.
>no, wastes too much storage.  Been down that road once.  You end up
>having to store the entire name in each entry.  Bad for your RAM.

Can't the tree contain only node pointers and pointers to static info?
The node pointers could replace a lot of code in switches but you won't
see benefits like that without rewriting more.

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 :-).

Bruce



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199511081959.GAA07042>