Date: Mon, 13 Mar 2006 12:52:31 -0800 From: Jason Evans <jasone@FreeBSD.org> To: SANETO Takanori <sanewo@ba2.so-net.ne.jp> Cc: freebsd-current@FreeBSD.org Subject: Re: malloc options incompatibility between phkmalloc and jemalloc Message-ID: <4415DB8F.6060409@FreeBSD.org> In-Reply-To: <4413C5D8.70208@ba2.so-net.ne.jp> 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>
next in thread | previous in thread | raw e-mail | index | archive | help
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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?4415DB8F.6060409>