tech-kern archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: Bloat



Andrew Doran <ad%netbsd.org@localhost> writes:
> Someone mentioned bloat as a reason in favour of wrapping lots of small
> sections of code in ifdef COMPAT_XX *. There are lots of potential reasons
> to do that, but you're on crack if you think avoiding bloat is one of them.
> 
> An i386 compat module I have here is around 20kB, so that's roughtly what
> the conditional part of the native compat code costs when in kernel - at
> least for the version of the module I am looking at. 20kB is around 0.2% of
> the size of the pre-modular i386 kernel.

If someone is trolling for bytes, I don't think they'll start out
with the GENERIC kernel.  A more fair comparision would be to
measure the size of the compat code against the size of a minimal
kernel.  From the NetBSD 5.0_BETA code base I built a
"NULL"-kernel, i.e. the smallest config I could get away with,
and it weighed in at 1095799 bytes.  With some more effort, it
could possibly be made even smaller.  Now, a 20kB non-avoidable
kernel size increase out of 1.1MB is is close to a 2% size
increase.
                                  -jarle

# NULL -- minimal kernel config file
include         "arch/i386/conf/std.i386"
config          netbsd  root on ? type ?
isa0    at mainbus?
attimer0        at isa?
npx0    at isa? port 0xf0 irq 13        # x86 math coprocessor


Home | Main Index | Thread Index | Old Index