From owner-freebsd-hackers Fri Jan 26 15: 5: 2 2001 Delivered-To: freebsd-hackers@freebsd.org Received: from fw.wintelcom.net (ns1.wintelcom.net [209.1.153.20]) by hub.freebsd.org (Postfix) with ESMTP id 54DD837B402; Fri, 26 Jan 2001 15:04:42 -0800 (PST) Received: (from bright@localhost) by fw.wintelcom.net (8.10.0/8.10.0) id f0QN4gf12123; Fri, 26 Jan 2001 15:04:42 -0800 (PST) Date: Fri, 26 Jan 2001 15:04:42 -0800 From: Alfred Perlstein To: Mike Smith Cc: Alexander Hausner , hackers@FreeBSD.ORG Subject: Re: Pthreads with sprintf/dtoa Message-ID: <20010126150441.J26076@fw.wintelcom.net> References: <01012621534501.00257@chuck.teleweb.at> <200101262314.f0QNEZb01395@mass.dis.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5i In-Reply-To: <200101262314.f0QNEZb01395@mass.dis.org>; from msmith@FreeBSD.ORG on Fri, Jan 26, 2001 at 03:14:35PM -0800 Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG * Mike Smith [010126 15:00] wrote: > > on Thu, 25 Jan 2001 Mike Smith wrote: > > > > > >__dtoa has static locals. Bad function, no biscuit. > > > > I think this can be a serious problem for any threaded application, > > I have not tested your patch yet, you think this is only a temporary > > solution right? Have you commited this patch to current? Is somebody > > else working on that? > > There are still serious problems; Tor pointed out that the Bigint > freelist probably needs protection too. > > Personally, I think the entire interface is totally bogus, and the > allocator should just call malloc. I don't have any benchmarks to test > printf speed though... This could also be solved by using pthread_getspecific(3) and friends to reduce the amount of malloc calls in persistant threads. Short lived threads might have to deal with some overhead, but long lived ones will be ok. -- -Alfred Perlstein - [bright@wintelcom.net|alfred@freebsd.org] "I have the heart of a child; I keep it in a jar on my desk." To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message