From owner-freebsd-hackers@FreeBSD.ORG Sun Mar 6 15:34:13 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 93090106566B for ; Sun, 6 Mar 2011 15:34:13 +0000 (UTC) (envelope-from rysto32@gmail.com) Received: from mail-ey0-f182.google.com (mail-ey0-f182.google.com [209.85.215.182]) by mx1.freebsd.org (Postfix) with ESMTP id 224128FC08 for ; Sun, 6 Mar 2011 15:34:12 +0000 (UTC) Received: by eyg7 with SMTP id 7so1204950eyg.13 for ; Sun, 06 Mar 2011 07:34:12 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:in-reply-to:references:date :message-id:subject:from:to:cc:content-type; bh=qYAzzLPqUhwcJvbbUXVxYEXWG063ZSobhiFEeYK4d7E=; b=ccUM40nzazaIHJPDX5S2bHqfLt/ZcVrVGiGl4HnhVnauJpW9D31siyQsU0gvbJc6jK 2QxcUEP1LAzeq1BJL0njBqMmOchQxffZtk1nW8ua9b5ghwVF8skcsTQyjPHNRwNiLEux 8pbsQBpnxtQAkzEjnA15MYX3qVyBTIl8otvUU= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; b=uOUuXejPWvUztIapOJhYZ40SvkYm3oiPfJdaT5dqbya3iFKsYoiWTIfiHd5SioSahG xbI9Hr70ALeWUHUWYgg9V5lDn/vIExp8PINHL0dfaUN8hNlTkRKWG6OEtap5kPT0id4m d7L4eIBX0A51GreB2PoKtoHzLmHLiT5W5nAGo= MIME-Version: 1.0 Received: by 10.213.28.200 with SMTP id n8mr365167ebc.3.1299425651853; Sun, 06 Mar 2011 07:34:11 -0800 (PST) Received: by 10.213.23.13 with HTTP; Sun, 6 Mar 2011 07:34:11 -0800 (PST) In-Reply-To: References: <40A52D4A-9397-4406-A7EC-E7CBBEFADD55@freebsd.org> <4D726887.5080800@rojer.pp.ru> <570723AB-7011-4185-89E1-E02F018DC0C3@ttel.com> Date: Sun, 6 Mar 2011 10:34:11 -0500 Message-ID: From: Ryan Stone To: Vlad Galu Content-Type: text/plain; charset=ISO-8859-1 Cc: Deomid Ryabkov , Eric Anderson , 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: Sun, 06 Mar 2011 15:34:13 -0000 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=7h to disable the caching.