From owner-freebsd-current@FreeBSD.ORG Mon Mar 13 20:53:38 2006 Return-Path: X-Original-To: freebsd-current@FreeBSD.org Delivered-To: freebsd-current@FreeBSD.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 5DD0616A427 for ; Mon, 13 Mar 2006 20:53:38 +0000 (UTC) (envelope-from jasone@FreeBSD.org) Received: from lh.synack.net (lh.synack.net [204.152.188.37]) by mx1.FreeBSD.org (Postfix) with ESMTP id 925CB43D80 for ; Mon, 13 Mar 2006 20:53:15 +0000 (GMT) (envelope-from jasone@FreeBSD.org) Received: by lh.synack.net (Postfix, from userid 100) id A32025E4912; Mon, 13 Mar 2006 12:53:15 -0800 (PST) Received: from [192.168.168.201] (moscow-cuda-gen2-68-64-60-20.losaca.adelphia.net [68.64.60.20]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by lh.synack.net (Postfix) with ESMTP id 47DD05E48F2; Mon, 13 Mar 2006 12:53:15 -0800 (PST) Message-ID: <4415DB8F.6060409@FreeBSD.org> Date: Mon, 13 Mar 2006 12:52:31 -0800 From: Jason Evans User-Agent: Mozilla Thunderbird 1.0.7-1.4.1 (X11/20050929) X-Accept-Language: en-us, en MIME-Version: 1.0 To: SANETO Takanori References: <200601161150.k0GBoamk010563@locutus.newmillennium.net.au> <91B40C65-A11B-427E-B352-8B6EF8A55864@freebsd.org> <43CECA2C.6030400@ba2.so-net.ne.jp> <6A234191-C4DA-4E1B-BB4D-1F3F8043DDA9@freebsd.org> <4413C5D8.70208@ba2.so-net.ne.jp> In-Reply-To: <4413C5D8.70208@ba2.so-net.ne.jp> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Checker-Version: SpamAssassin 3.0.5 (2005-11-28) on lh.synack.net X-Spam-Level: * X-Spam-Status: No, score=1.8 required=5.0 tests=RCVD_IN_NJABL_DUL, RCVD_IN_SORBS_DUL autolearn=no version=3.0.5 Cc: freebsd-current@FreeBSD.org Subject: Re: malloc options incompatibility between phkmalloc and jemalloc X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 13 Mar 2006 20:53:38 -0000 SANETO Takanori wrote: > I don't think this is serious problem, but it's annoying. > > When I put 'k' in /etc/malloc.conf, some commands (cvsup and > vmware-checkvm) show warning about unknown character. These commands > seem to have phkmalloc implementation linked statically. > > On the other hand, when I put '>' in /etc/malloc.conf, many commands > will show warnings. > > For second case, isn't it reasonable for jemalloc to just ignore > phkmalloc specific characters? > For first case, how about introducing new option source (i.e. > /etc/jemalloc.conf, JEMALLOC_OPTIONS or something like that)? > > What do you think? This is a sticky issue. I'd rather leave things as they are, partly because I expect the "fix" would actually be quite messy. I view malloc options as pretty much exclusively a devel/debug aid, rather than a stable API. In order to truly fix this API, I think we'd have to go further than what you suggest. The _malloc_options global variable is harder to deal with than MALLOC_OPTIONS or /etc/malloc.conf when trying to design a fix. The problem for _malloc_options is that we can't reliably use a function-based API, since malloc may be called before the application has a chance to configure the allocator. As such, there is no direct way for an app to respond to malloc option incompatibilities. It would be possible to construct a more complex interface for malloc configuration that would mostly solve these issues, but I don't think it's worth the added complexity for a devel/debug facility. Jason