[prev in list] [next in list] [prev in thread] [next in thread] 

List:       openjdk-hotspot-runtime-dev
Subject:    Re: RFR: JDK-8269571: NMT should print total malloc bytes and invocation count
From:       Xin Liu <xliu () openjdk ! java ! net>
Date:       2021-06-30 7:27:06
Message-ID: kQ8sGdM7AgrTOXJrAwQY791Riah7l7h7eA1bSwJRpzw=.75617087-fbb1-44b0-a033-fef5f0e2a07b () github ! com
[Download RAW message or body]

On Wed, 30 Jun 2021 04:37:33 GMT, Thomas Stuefe <stuefe@openjdk.org> wrote:

> > your change looks good to me.
> 
> Thanks!
> 
> > > ```
> > > malloc: 40590KB #13669
> > > ```
> > 
> > 
> > I think 13669 is the invocation count of malloc(). Out of curiosity, may I know \
> > how to use it? Do you intend to use this to pinpoint memleak from malloc()? A \
> > straight malloc() icount may not help much. Is it possible we can have the number \
> > of unbalanced malloc()? That is icount of malloc() minus icount of free(). of \
> > course, it is not directly related to this PR.
> 
> That count is not the invocation counter (which can be useful too under certain \
> conditions) but the number of outstanding allocations.
I see.  I take a look at mallocTracker.hpp. It's unbalanced count.

-------------

PR: https://git.openjdk.java.net/jdk/pull/4622


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic