process heap size under QNX 6.2.0

How to find out the heap used memory size for a particular process?

Janusz Ruszel.

Janusz Ruszel <janusz_ruszel@notvalid.com> wrote:
JR > How to find out the heap used memory size for a particular process?

JR > Janusz Ruszel.


Look at the ‘psin’ command and ‘pidin me’.

You might find “spin” (included on 3rd party CD) more useful for this
purpose.

“Janusz Ruszel” <janusz_ruszel@notvalid.com> wrote in message
news:btf9di$iq6$1@inn.qnx.com

How to find out the heap used memory size for a particular process?

Janusz Ruszel.

There is no space to run “spin” on the target I want to debug for memory
leaking. Yeah, I can run it remotly. Spin is a great tool but I need check
heap size inside my application.

The description of malloc_g library says that there is function to check the
heap size but the function itself is not implemented.

Janusz Ruszel.

“Igor Kovalenko” <kovalenko@attbi.com> wrote in message
news:btgdvq$d3s$1@inn.qnx.com

You might find “spin” (included on 3rd party CD) more useful for this
purpose.

“Janusz Ruszel” <> janusz_ruszel@notvalid.com> > wrote in message
news:btf9di$iq6$> 1@inn.qnx.com> …
How to find out the heap used memory size for a particular process?

Janusz Ruszel.
\

Interesting… if you’re so tight on memory that you can’t even load spin,
I’d say you have a bigger problem. It only needs about 128k … Not having
that much essentially means you can’t run many other utilities, because
shell won’t be able to fork (unless you use some smaller shell, but even
then most utilities will require at least half as much).

You can modify the code to look only for certain pid instead of going
through all processes. Or just decrease the constant that defines max.
number of processes - the size of arrays used to keep & sort stuff depends
on it.

– igor

“Janusz Ruszel” <janusz_ruszel@notvalid.com> wrote in message
news:bth93c$36a$1@inn.qnx.com

There is no space to run “spin” on the target I want to debug for memory
leaking. Yeah, I can run it remotly. Spin is a great tool but I need check
heap size inside my application.

The description of malloc_g library says that there is function to check
the
heap size but the function itself is not implemented.

Janusz Ruszel.

“Igor Kovalenko” <> kovalenko@attbi.com> > wrote in message
news:btgdvq$d3s$> 1@inn.qnx.com> …
You might find “spin” (included on 3rd party CD) more useful for this
purpose.

“Janusz Ruszel” <> janusz_ruszel@notvalid.com> > wrote in message
news:btf9di$iq6$> 1@inn.qnx.com> …
How to find out the heap used memory size for a particular process?

Janusz Ruszel.


\

Igor,
where I can find spin source code? Did you use “electrict fance” ?
(any thoughts to share? )

Thanks,
Janusz.


“Igor Kovalenko” <kovalenko@attbi.com> wrote in message
news:bthcc1$58k$1@inn.qnx.com

Interesting… if you’re so tight on memory that you can’t even load spin,
I’d say you have a bigger problem. It only needs about 128k … Not having
that much essentially means you can’t run many other utilities, because
shell won’t be able to fork (unless you use some smaller shell, but even
then most utilities will require at least half as much).

You can modify the code to look only for certain pid instead of going
through all processes. Or just decrease the constant that defines max.
number of processes - the size of arrays used to keep & sort stuff depends
on it.

– igor

“Janusz Ruszel” <> janusz_ruszel@notvalid.com> > wrote in message
news:bth93c$36a$> 1@inn.qnx.com> …
There is no space to run “spin” on the target I want to debug for memory
leaking. Yeah, I can run it remotly. Spin is a great tool but I need
check
heap size inside my application.

The description of malloc_g library says that there is function to check
the
heap size but the function itself is not implemented.

Janusz Ruszel.

“Igor Kovalenko” <> kovalenko@attbi.com> > wrote in message
news:btgdvq$d3s$> 1@inn.qnx.com> …
You might find “spin” (included on 3rd party CD) more useful for this
purpose.

“Janusz Ruszel” <> janusz_ruszel@notvalid.com> > wrote in message
news:btf9di$iq6$> 1@inn.qnx.com> …
How to find out the heap used memory size for a particular process?

Janusz Ruszel.




\

http://home.comcast.net/~kovalenko/qnx/spin/spin-1.10.tgz

“Janusz Ruszel” <janusz_ruszel@notvalid.com> wrote in message
news:btv2ep$hgi$1@inn.qnx.com

Igor,
where I can find spin source code? Did you use “electrict fance” ?
(any thoughts to share? )

Thanks,
Janusz.


“Igor Kovalenko” <> kovalenko@attbi.com> > wrote in message
news:bthcc1$58k$> 1@inn.qnx.com> …
Interesting… if you’re so tight on memory that you can’t even load
spin,
I’d say you have a bigger problem. It only needs about 128k … Not
having
that much essentially means you can’t run many other utilities, because
shell won’t be able to fork (unless you use some smaller shell, but even
then most utilities will require at least half as much).

You can modify the code to look only for certain pid instead of going
through all processes. Or just decrease the constant that defines max.
number of processes - the size of arrays used to keep & sort stuff
depends
on it.

– igor

“Janusz Ruszel” <> janusz_ruszel@notvalid.com> > wrote in message
news:bth93c$36a$> 1@inn.qnx.com> …
There is no space to run “spin” on the target I want to debug for
memory
leaking. Yeah, I can run it remotly. Spin is a great tool but I need
check
heap size inside my application.

The description of malloc_g library says that there is function to
check
the
heap size but the function itself is not implemented.

Janusz Ruszel.

“Igor Kovalenko” <> kovalenko@attbi.com> > wrote in message
news:btgdvq$d3s$> 1@inn.qnx.com> …
You might find “spin” (included on 3rd party CD) more useful for
this
purpose.

“Janusz Ruszel” <> janusz_ruszel@notvalid.com> > wrote in message
news:btf9di$iq6$> 1@inn.qnx.com> …
How to find out the heap used memory size for a particular
process?

Janusz Ruszel.






\

The spin code is very helpful!
Do you know how to calculate the amount of used heap memory?

Regards,
Janusz.


“Igor Kovalenko” <kovalenko@attbi.com> wrote in message
news:bu016l$83n$1@inn.qnx.com

http://home.comcast.net/~kovalenko/qnx/spin/spin-1.10.tgz

“Janusz Ruszel” <> janusz_ruszel@notvalid.com> > wrote in message
news:btv2ep$hgi$> 1@inn.qnx.com> …
Igor,
where I can find spin source code? Did you use “electrict fance” ?
(any thoughts to share? )

Thanks,
Janusz.


“Igor Kovalenko” <> kovalenko@attbi.com> > wrote in message
news:bthcc1$58k$> 1@inn.qnx.com> …
Interesting… if you’re so tight on memory that you can’t even load
spin,
I’d say you have a bigger problem. It only needs about 128k … Not
having
that much essentially means you can’t run many other utilities,
because
shell won’t be able to fork (unless you use some smaller shell, but
even
then most utilities will require at least half as much).

You can modify the code to look only for certain pid instead of going
through all processes. Or just decrease the constant that defines max.
number of processes - the size of arrays used to keep & sort stuff
depends
on it.

– igor

“Janusz Ruszel” <> janusz_ruszel@notvalid.com> > wrote in message
news:bth93c$36a$> 1@inn.qnx.com> …
There is no space to run “spin” on the target I want to debug for
memory
leaking. Yeah, I can run it remotly. Spin is a great tool but I need
check
heap size inside my application.

The description of malloc_g library says that there is function to
check
the
heap size but the function itself is not implemented.

Janusz Ruszel.

“Igor Kovalenko” <> kovalenko@attbi.com> > wrote in message
news:btgdvq$d3s$> 1@inn.qnx.com> …
You might find “spin” (included on 3rd party CD) more useful for
this
purpose.

“Janusz Ruszel” <> janusz_ruszel@notvalid.com> > wrote in message
news:btf9di$iq6$> 1@inn.qnx.com> …
How to find out the heap used memory size for a particular
process?

Janusz Ruszel.








\

There is no way to know externally what a given process is doing within its
heap space. The only way would be to overload malloc()/free() and friends
and have your own internal accounting.

– igor

“Janusz Ruszel” <janusz_ruszel@notvalid.com> wrote in message
news:bu4oel$obg$1@inn.qnx.com

The spin code is very helpful!
Do you know how to calculate the amount of used heap memory?

Regards,
Janusz.


“Igor Kovalenko” <> kovalenko@attbi.com> > wrote in message
news:bu016l$83n$> 1@inn.qnx.com> …
http://home.comcast.net/~kovalenko/qnx/spin/spin-1.10.tgz

“Janusz Ruszel” <> janusz_ruszel@notvalid.com> > wrote in message
news:btv2ep$hgi$> 1@inn.qnx.com> …
Igor,
where I can find spin source code? Did you use “electrict fance”
?
(any thoughts to share? )

Thanks,
Janusz.


“Igor Kovalenko” <> kovalenko@attbi.com> > wrote in message
news:bthcc1$58k$> 1@inn.qnx.com> …
Interesting… if you’re so tight on memory that you can’t even load
spin,
I’d say you have a bigger problem. It only needs about 128k … Not
having
that much essentially means you can’t run many other utilities,
because
shell won’t be able to fork (unless you use some smaller shell, but
even
then most utilities will require at least half as much).

You can modify the code to look only for certain pid instead of
going
through all processes. Or just decrease the constant that defines
max.
number of processes - the size of arrays used to keep & sort stuff
depends
on it.

– igor

“Janusz Ruszel” <> janusz_ruszel@notvalid.com> > wrote in message
news:bth93c$36a$> 1@inn.qnx.com> …
There is no space to run “spin” on the target I want to debug for
memory
leaking. Yeah, I can run it remotly. Spin is a great tool but I
need
check
heap size inside my application.

The description of malloc_g library says that there is function to
check
the
heap size but the function itself is not implemented.

Janusz Ruszel.

“Igor Kovalenko” <> kovalenko@attbi.com> > wrote in message
news:btgdvq$d3s$> 1@inn.qnx.com> …
You might find “spin” (included on 3rd party CD) more useful for
this
purpose.

“Janusz Ruszel” <> janusz_ruszel@notvalid.com> > wrote in message
news:btf9di$iq6$> 1@inn.qnx.com> …
How to find out the heap used memory size for a particular
process?

Janusz Ruszel.










\