Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754082Ab1CQLqh (ORCPT ); Thu, 17 Mar 2011 07:46:37 -0400 Received: from mail-bw0-f46.google.com ([209.85.214.46]:55127 "EHLO mail-bw0-f46.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752910Ab1CQLqe convert rfc822-to-8bit (ORCPT ); Thu, 17 Mar 2011 07:46:34 -0400 DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-type:content-transfer-encoding; b=LAVSPWyawAMKeQiLxnSNcxBMq382uaZJubH0H1NOFrMNwaQIPv3VT8YnrWOy1GdkKj AKPfOUzs7jf1FxzyCLE/sqmecJAlDs5ysXq0rLnLodGARwuGikzXrnmyzjcjN4JRmo2N 3nBc/qx1iDAWWEy1Nx5rhpZ0tkghPgf9d5k5E= MIME-Version: 1.0 In-Reply-To: <4D80C47C.80300@draigBrady.com> References: <20110315091412.de6eb63c.rdunlap@xenotime.net> <4D80C47C.80300@draigBrady.com> From: Aneesh Bhasin Date: Thu, 17 Mar 2011 17:16:13 +0530 Message-ID: Subject: Re: smap output - unnamed entries and heap To: =?ISO-8859-1?Q?P=E1draig_Brady?= Cc: Randy Dunlap , linux-newbie , linux-kernel Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8BIT Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1234 Lines: 33 2011/3/16 P?draig Brady : > On 16/03/11 05:19, Aneesh Bhasin wrote: >> Also, is there a way in linux (without using >> dedicated tools like valgrind), to see how much heap or anonymous >> memory is attributed to code arising from a particular library/binary > > You might find ps_mem.py useful. > If parses smaps and reports RAM usage of a program > > http://www.pixelbeat.org/scripts/ps_mem.py > > cheers, > P?draig. I did try that script. Unfortunately, I not only want the memory used for my program but also, which library is contributing to that memory. To that end, I have written a small script which parses the smap output in a format more suitable for my analysis. However, as I wrote earlier, there a lot of anonymous memory regions listed in smap output (with permission rwxp) - and I do not know of any way in which I could associate these memory mapping to a particular library.. Any pointers in this regard will be highly appreciated :) Regards, Aneesh -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/