GC User Commands
NAME
gc - Garbage Collection
SYNOPSIS
gc [OPTIONS]
DESCRIPTION
JNIOR applications are Java programs and Java programs continually create
objects using memory. When objects fall out of scope (are no longer used)
they must be cleaned up. This process is called Garbage Collection (GC).
The GC activity under JANOS has minimal impact on program performance. The
GC command is available for status.
-R
Resets statistics.
-D
Disable GC. This option is available to assist in diagnostics and
performance evaluations. GC will automatically restart when memory
reaches a critical level.
DIAGNOSTICS
Memory management is a vital part of system and application development. It
is possible to cause a Memory Leak when memory is allocated and not
released. This is a situation when memory slowly becomes unavailable until
performance is impacted.
There are a couple of options to the GC command that provide memory allocation
detail that can assist in detecting a memory leak and tracking down the cause.
-M
Lists the Top 10 memory allocation sources (hex address) by decreasing
memory usage. When repeating the GC -M command if there is a source
with continuously increasing usage (and block count) then a leak is
the suggested cause.
-B
Lists the Top 10 memory allocation sources by decreasing block counts.
A memory leak involving very small blocks may not stand out against
applications with higher memory usage. Here we can watch the block
count.
-L
List all memory allocation by decreasing usage.
NOTES
Memory leaks within the operating system need to be corrected. If you suspect
a leak you should report it to INTEG. While OS leaks have occurred, most have
been eradicated.
JNIOR Applications are written in Java and scripts in PHP both of which are
managed languages. Memory management is not the job of the programmer in
those cases. However, Arrays, Vectors and Hashtables can continuously collect
entries that potentially may never be removed. This is essentially a memory
leak that will lead to performance issues. These situations become evident in
the GC diagnostics.
Not all JNIOR applications are developed and maintained by INTEG. Many
customers handle their own application programs. These diagnostic tools are
being provided to assist them.
The hexadecimal addresses relate to locations within the operating system.
if you suspect a leak and need more information contact Technical Support.
[/flash/manpages/manpages.hlp:4373]