HP3000-L Archives

March 1998, Week 2

HP3000-L@RAVEN.UTC.EDU

Options: Use Monospaced Font
Show Text Part by Default
Show All Mail Headers

Message: [<< First] [< Prev] [Next >] [Last >>]
Topic: [<< First] [< Prev] [Next >] [Last >>]
Author: [<< First] [< Prev] [Next >] [Last >>]

Print Reply
Subject:
From:
Mark Bixby <[log in to unmask]>
Reply To:
Date:
Tue, 10 Mar 1998 14:01:56 -0800
Content-Type:
text/plain
Parts/Attachments:
text/plain (28 lines)
I've been asked how you can determine if a process might have a memory leak.

In a POSIX/C environment, memory leaks most commonly occur when a process
malloc()s a chunk of memory, uses it for some purpose, and then forgets to
free() it when the memory is no longer needed.  Over time, this allocated but
unused memory can add up to system performance degrading levels.

GLANCE doesn't appear to provide this kind of detailed memory information
about a process, i.e. what is the total amount of memory allocated to the
process.  (If other tools have this capability, great, feel free to <plug>
them, but I'm looking for an HP solution.)

If no tools exist to provide this info, I assume it could probably be obtained
via :DEBUG and examining the various memory pointers in the PIB and PIBX etc.
But I don't know where malloc()-ed memory comes from; I've never needed to
know, so I don't know what to look at with :DEBUG.

So my question remains: how can I tell the total size of all memory allocated
to a process, especially malloc()-ed memory?

Thanks!
--
Mark Bixby                      E-mail: [log in to unmask]
Coast Community College Dist.   Web: http://www.cccd.edu/~markb/
District Information Services   1370 Adams Ave, Costa Mesa, CA, USA 92626-5429
Technical Support               Voice: +1 714 438-4647
"You can tune a file system, but you can't tune a fish." - tunefs(1M)

ATOM RSS1 RSS2