Date: Fri, 26 Jan 2001 15:04:42 -0800 From: Alfred Perlstein <bright@wintelcom.net> To: Mike Smith <msmith@FreeBSD.ORG> Cc: Alexander Hausner <alh@teleweb.at>, hackers@FreeBSD.ORG Subject: Re: Pthreads with sprintf/dtoa Message-ID: <20010126150441.J26076@fw.wintelcom.net> In-Reply-To: <200101262314.f0QNEZb01395@mass.dis.org>; from msmith@FreeBSD.ORG on Fri, Jan 26, 2001 at 03:14:35PM -0800 References: <01012621534501.00257@chuck.teleweb.at> <200101262314.f0QNEZb01395@mass.dis.org>
next in thread | previous in thread | raw e-mail | index | archive | help
* Mike Smith <msmith@FreeBSD.ORG> [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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20010126150441.J26076>