[comp.sys.next] MallocDebug Incompatible with ProcessMonitor?

paulk@lotus.com (Paul Kleppner LID-02264) (02/12/91)

In article <4616@network.ucsd.edu> pbiron@weber.ucsd.edu (Paul Biron) writes:
[problems about MallocDebug, and ProcessorMonitor]

Here's a suggestion for one of the ProcessMonitor problems you mentioned
in your article ("can't connect to an app started from
the command-line").  I bet if you use the "open" command
to start your app from the shell, ProcessMonitor will be able to see it.
(See open(1) for details.)

A couple of other problems I've noticed using MallocDebug.

The first is:  MallocDebug "fakes" the use of zones.  Although a report
generated by MallocDebug shows the zone numbers that were requested
for each node, the nodes are not actually placed into zones.  This could
be confusing for anybody who is looking at the MallocDebug output and
attempting to correlate the node addresses with memory pages.

The second is: when using the MallocDebug libraries,  the NXZoneFromPtr()
only works when passed a pointer to the beginning of an allocated node.
It does NOT work when passed an address somewhere in the middle of
the allocated node.  (It always returns the default zone in this case.)
If the MallocDebug libraries are not used, NXZoneFromPtr() works in
both cases.

These bugs notwithstanding, I must say that MallocDebug is a *very*
nice tool to have.

Paul Kleppner
Lotus
paulk@lotus.com

rca@cs.brown.edu (Ronald C.F. Antony) (02/12/91)

In article <4616@network.ucsd.edu> pbiron@weber.ucsd.edu (Paul Biron) writes:
>Two other minor problems I've found with ProcessMonitor are:
>
>1. it can't connect to an app started from the command-line.

Try to open the application with

open /path/appname.app &

and try then to connect.

Ronald
------------------------------------------------------------------------------
"The reasonable man adapts himself to the world; the unreasonable one persists
in trying to adapt the world to himself. Therefore all progress depends on the
unreasonable man."   G.B. Shaw   |  rca@cs.brown.edu or antony@browncog.bitnet

pbiron@weber.ucsd.edu (Paul Biron) (02/13/91)

In article <1991Feb11.181205.16113@lotus.com> paulk@lotus.UUCP (Paul Kleppner) writes:
>In article <4616@network.ucsd.edu> pbiron@weber.ucsd.edu (Paul Biron) writes:
>[problems about MallocDebug, and ProcessorMonitor]
>
>Here's a suggestion for one of the ProcessMonitor problems you mentioned
>in your article ("can't connect to an app started from
>the command-line").  I bet if you use the "open" command
>to start your app from the shell, ProcessMonitor will be able to see it.
>(See open(1) for details.)
>

[additional minor problems with MallocDebug deleted]

>Paul Kleppner
>Lotus
>paulk@lotus.com

I got a note from Dave Moore, the author of ProcessMonitor (PM).  He said
that PM *should* be able to connect to an app started from the command-line...
and he is right!!  Thanx again Dave.

It turns out that I was su'd over to another user at the time I launched
the app, and *that* is why PM couldn't connect to it.  I have verified
that as long as the *same* user (i.e. same euid) launches PM and a given
app (no matter how each was launched) then there is no problem!

-----------------------------------------------------------------------
Fighting for peace is like fucking for virginity!
-----------------------------------------------------------------------
Paul Biron     garp!pbiron@keynes.ucsd.edu    (can have NeXT attachments)
SnUG/SIGHaCK        pbiron@ucsd.edu           (normal net mail)

"Outside of a dog, a book is man's best friend.
 Inside of a dog, it's too dark to read."
                         --Groucho Marx
Paul Biron      pbiron@ucsd.edu        (619) 534-5758
Central University Library, Mail Code C-075-R
Social Sciences DataBase Project
University of California, San Diego, La Jolla, Ca. 92093