From owner-freebsd-hackers@FreeBSD.ORG Mon Mar 7 02:58:47 2011 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8F4D4106564A for ; Mon, 7 Mar 2011 02:58:47 +0000 (UTC) (envelope-from anderson@ttel.com) Received: from mail-yw0-f54.google.com (mail-yw0-f54.google.com [209.85.213.54]) by mx1.freebsd.org (Postfix) with ESMTP id 4B6088FC16 for ; Mon, 7 Mar 2011 02:58:46 +0000 (UTC) Received: by ywf9 with SMTP id 9so1669335ywf.13 for ; Sun, 06 Mar 2011 18:58:46 -0800 (PST) Received: by 10.236.110.50 with SMTP id t38mr2153727yhg.84.1299466726339; Sun, 06 Mar 2011 18:58:46 -0800 (PST) Received: from [10.0.7.145] (r74-193-70-198.pfvlcmta01.grtntx.tl.dh.suddenlink.net [74.193.70.198]) by mx.google.com with ESMTPS id y73sm1425614yhc.42.2011.03.06.18.58.44 (version=TLSv1/SSLv3 cipher=OTHER); Sun, 06 Mar 2011 18:58:45 -0800 (PST) Sender: Eric Anderson Mime-Version: 1.0 (Apple Message framework v1082) Content-Type: text/plain; charset=us-ascii From: Eric Anderson In-Reply-To: Date: Sun, 6 Mar 2011 20:58:43 -0600 Content-Transfer-Encoding: quoted-printable Message-Id: References: <40A52D4A-9397-4406-A7EC-E7CBBEFADD55@freebsd.org> <4D726887.5080800@rojer.pp.ru> <570723AB-7011-4185-89E1-E02F018DC0C3@ttel.com> To: Ryan Stone X-Mailer: Apple Mail (2.1082) Cc: Deomid Ryabkov , Vlad Galu , freebsd-hackers@freebsd.org Subject: Re: Mem leak : malloc/free + pthreads = leakage? X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 07 Mar 2011 02:58:47 -0000 On Mar 6, 2011, at 11:35 AM, Ryan Stone wrote: > On Sun, Mar 6, 2011 at 10:34 AM, Ryan Stone wrote: >> I would try playing with MALLOC_OPTIONS. I seriously doubt that = there >> is an actual leak in jemalloc, but from my own experiences with it I >> suspect that there are certain multithreaded malloc/free sequences >> that interact badly with with the per-thread caching that jemalloc >> performs. The first thing I would try is setting MALLOC_OPTIONS=3D7h = to >> disable the caching. >>=20 >=20 > Wait, sorry, apparently this is a new option in HEAD. Under 8.1 > MALLOC_OPTIONS=3Dg will disable the thread-specific caching. See the > malloc(3) man page for the definitive list of available options. Thanks - I think I tried that at one point with no change, but I'll = double check just in case. Thanks for the hints! Eric