From owner-freebsd-arch@FreeBSD.ORG Mon Mar 15 07:02:48 2004 Return-Path: Delivered-To: freebsd-arch@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id DF0AE16A4CE; Mon, 15 Mar 2004 07:02:48 -0800 (PST) Received: from elvis.mu.org (elvis.mu.org [192.203.228.196]) by mx1.FreeBSD.org (Postfix) with ESMTP id C256243D39; Mon, 15 Mar 2004 07:02:48 -0800 (PST) (envelope-from mux@freebsd.org) Received: by elvis.mu.org (Postfix, from userid 1920) id ABDAA5C79A; Mon, 15 Mar 2004 07:02:48 -0800 (PST) Date: Mon, 15 Mar 2004 16:02:48 +0100 From: Maxime Henrion To: Dag-Erling Sm?rgrav Message-ID: <20040315150248.GL35475@elvis.mu.org> References: <20040315143123.GB8930@darkness.comp.waw.pl> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.4.1i cc: Pawel Jakub Dawidek cc: freebsd-arch@freebsd.org Subject: Re: Bitstring(9) in kernel. X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 15 Mar 2004 15:02:49 -0000 Dag-Erling Sm?rgrav wrote: > Pawel Jakub Dawidek 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. Cheers, Maxime