NetBSD-Bugs archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
re: port-i386/57641: -current/i386 no longer installs in 32 MB
Andrew Doran writes:
> On Wed, Oct 04, 2023 at 10:50:25PM +0000, Taylor R Campbell wrote:
>
> > > From: Andrew Doran <ad%netbsd.org@localhost>
> > >
> > > It's probably not an satisfying answer but I don't think it's a valid test
> > > because DIAGNOSTIC uses a lot more memory and we shouldn't be shipping
> > > actual release kernels with it enabled.
> >
> > How much more memory? DIAGNOSTIC is supposed to be reasonably cheap,
> > mostly cheap predicted-not-taken branches in assertions.
>
> There's not an easy formula for that. kmem adds sizeof(size_t) to every
> allocation to track that size allocated is the same as size freed, which
> eats a lot more space than expected because alignment requirements (for
> cache friendliness) still need to be met.
while i agree it may not be true to the "reasonably cheap" rule,
i think that the damage caused by wrong kmem_free() size is far
too dangerous to push this to only DEBUG.
(i am suddenly thinking about turning on KMEM_SIZE in all my
kernels anyway, cuz this cost enables something i'd rather see
crash than corrupt.)
.mrg.
Home |
Main Index |
Thread Index |
Old Index