Bitstring(9) in kernel.

Dag-ErlingSmørgrav des at des.no
Mon Mar 15 07:10:22 PST 2004


Maxime Henrion <mux at freebsd.org> writes:
> Dag-Erling Sm?rgrav wrote:
> > Pawel Jakub Dawidek <pjd at FreeBSD.org> writes:
> > > Ok, bitstring(9) is broken for kernel use atm, because leak of calloc()
> > > function. What we should do about it?
> > No, it isn't broken.  You just have to use bitstr_size() to figure out
> > how much space it needs and do the alloc yourself.
> That is, reimplement bit_alloc().  This makes 0 sense, we should indeed
> fix bit_alloc() as Pawel suggested.

What doesn't make sense is to assume that there is no difference
between the kernel and userland and that you can write code which will
work in both.

There are bugs in the kernel which I can't fix properly because
Somebody[tm] decided they wanted to use sbufs in userland, and dumbed
down the code so the changes I need to make are no longer possible.
So we have to live with workarounds...

That being said, I have no objection to Pawel's patch.

DES
-- 
Dag-Erling Smørgrav - des at des.no


More information about the freebsd-arch mailing list