Subject: Re: Replacing the sysctl() interface.
To: Chris G. Demetriou <cgd@sibyte.com>
From: Jun-ichiro itojun Hagino <itojun@iijlab.net>
List: tech-kern
Date: 06/06/2000 08:29:46
>> Compared to FreeBSD style, NetBSD style seems more elegant, far less
>> insane, and encouradges good programming style. The *DEFINE() add just too
>> much unneeded "magic", add complexity and make finding dependencies
>> harder, at the very least.
>Uh, I'd disagree that it's good programming style, at the very least.
>In general, it's good programming style to keep module-specific data
>and definitions in one place, close to the module. The existing way
>NetBSD does things makes that effectively impossible (and creates
>extra maintenance work, too).
the issue is that, malloc types are not really module-specific.
they will be put into global data structure (m->m_type).
malloc types needs to be unique across the souce code tree to
diffferentiate between them. I believe centralized management in
sys/sys/malloc.h is good enough.
itojun