From owner-freebsd-hackers@FreeBSD.ORG Sat Mar 5 04:26:14 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 AED02106566B for ; Sat, 5 Mar 2011 04:26:14 +0000 (UTC) (envelope-from anderson@ttel.com) Received: from mail-yx0-f182.google.com (mail-yx0-f182.google.com [209.85.213.182]) by mx1.freebsd.org (Postfix) with ESMTP id 741298FC15 for ; Sat, 5 Mar 2011 04:26:14 +0000 (UTC) Received: by yxl31 with SMTP id 31so1138747yxl.13 for ; Fri, 04 Mar 2011 20:26:13 -0800 (PST) Received: by 10.236.191.39 with SMTP id f27mr682136yhn.47.1299297767856; Fri, 04 Mar 2011 20:02:47 -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 8sm90973yhl.44.2011.03.04.20.02.46 (version=TLSv1/SSLv3 cipher=OTHER); Fri, 04 Mar 2011 20:02:47 -0800 (PST) From: Eric Anderson Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable Date: Fri, 4 Mar 2011 22:02:45 -0600 Message-Id: <40A52D4A-9397-4406-A7EC-E7CBBEFADD55@freebsd.org> To: freebsd-hackers@freebsd.org Mime-Version: 1.0 (Apple Message framework v1082) X-Mailer: Apple Mail (2.1082) X-Mailman-Approved-At: Sat, 05 Mar 2011 04:46:47 +0000 Subject: 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: Sat, 05 Mar 2011 04:26:14 -0000 Hi all, I have a moderately threaded userland program (all C) I am working on = (using pthreads, freebsd 8.1 64bit). It seems to leak memory (using = standard malloc/free) badly. I am using pcap to capture packets and = process them. I have a handful of libs statically linked in (pcap is = one, the rest don't seem to matter - I can remove them and still see the = leak). =20 Does anyone know of issues regarding malloc/free on multithreaded = userland apps? =20 Sorry, I can't post the code.. Thanks! Eric