Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 24 Jan 1999 15:55:50 -0800 (PST)
From:      Matthew Dillon <dillon@apollo.backplane.com>
To:        Mikhail Teterin <mi@kot.ne.mediaone.net>
Cc:        current@FreeBSD.ORG
Subject:   Re: sysctl oids (was: Re: kvm question)
Message-ID:  <199901242355.PAA05605@apollo.backplane.com>
References:   <199901242340.SAA04694@kot.ne.mediaone.net>

next in thread | previous in thread | raw e-mail | index | archive | help
:Seldom. But the strings are still in the kernel, which becomes
:bigger with every build. My argument was more general, however,
:and directed against the growing tendency to use string literal
:(and copy them beck and forth). IMHO, the point of faster hardware
:is purely to have thing running faster, rather then letting
:programmers be "sloppier".
:
:However, as I already stated, this is just my preference.
:
:	-mi

    You are operating under the assumption that the strings somehow
    take a huge amount of space compared to an int and the rest of the
    sysctl structure.  This couldn't be farther from the truth.

apollo:/usr/src/sys# sysctl -A | awk '{ print $1; }' | sed -e 's/://' | wc 
     384     382    7555

    8K.  Not a big deal.  And this doesn't even include filtering out the
    prefixes which I'm duplicate-counting all over the place.

    The equivalent 'integer' form, judging by the average length of the
    postfix string, would still eat 3K, so we'd only be saving 5K.

    Strings are a whole lot more portable then integer assignments.

					-Matt
					Matthew Dillon 
					<dillon@backplane.com>


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-current" in the body of the message



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