public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: george anzinger <george@mvista.com>
To: root@chaos.analogic.com
Cc: Aleksandar Kacanski <kacanski@yahoo.com>, linux-kernel@vger.kernel.org
Subject: Re: Memory leak
Date: Mon, 26 Aug 2002 12:44:54 -0700	[thread overview]
Message-ID: <3D6A8536.83B30C18@mvista.com> (raw)
In-Reply-To: Pine.LNX.3.95.1020826152100.6296B-100000@chaos.analogic.com

"Richard B. Johnson" wrote:
> 
> On Mon, 26 Aug 2002, Aleksandar Kacanski wrote:
> 
> > Hello,
> > I am running 2.4.18-3 version of the kernel on smp dual
> > processor and 1GB of RAM. My memory usage is increasing and
> > I can't find what exactly is eating memory. Top and proc
> > are reporting increases, but I would like to know of a
> > better way of tracing usage of memory and possible leak in
> > application(s).
> >
> > Please reply to kacanski@yahoo.com
> > thanks                Sasha
> >
> >
> 
> Applications that use malloc() and friends, get more memory from
> the kernel by resetting the break address. It's called "morecore()".
> You can put a procedure, perhaps off SIGALRM, that periodically
> checks the break address and writes it to a log. Applications
> that end up with an ever-increasing break address have memory
> leaks. Note that the break address is almost never set back.
> This is not an error; malloc() assumes that if you used a lot
> of memory once, you'll probably use it again. Check out sbrk()
> and brk() in the man pages.

But this all comes back when the application ends.  You
should be able to see the memory reappear when the app
terminates.

-- 
George Anzinger   george@mvista.com
High-res-timers: 
http://sourceforge.net/projects/high-res-timers/
Preemption patch:
http://www.kernel.org/pub/linux/kernel/people/rml

  reply	other threads:[~2002-08-26 19:41 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-08-26 19:01 Memory leak Aleksandar Kacanski
2002-08-26 19:29 ` Richard B. Johnson
2002-08-26 19:44   ` george anzinger [this message]
2002-08-26 20:05     ` Richard B. Johnson
     [not found]     ` <Pine.LNX.3.95.1020826155614.6481A-100000@chaos.analogic.co m>
2002-08-27  5:44       ` Mike Galbraith
2002-08-27  3:43   ` jw schultz
  -- strict thread matches above, loose matches on Subject: below --
2002-06-20  2:24 Skip Gaede

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=3D6A8536.83B30C18@mvista.com \
    --to=george@mvista.com \
    --cc=kacanski@yahoo.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=root@chaos.analogic.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox