======                                              NOSview [301]
memory
======

_________________________________________________________________
memory circular [on|off]                              Default: on
_________________________________________________________________
Experimental flag for enabling or disabling reset of a search
pointer.

>> Example:  memory circular off


_________________________________________________________________
memory debug [on|off]                                Default: off
_________________________________________________________________
Display or set the memory allocator debug flag.

If set to 'on', debug information containing most flags and
parameters from the memory allocation routines is written to the
log file.


_________________________________________________________________
memory efficient [on|off]                             Default: on
_________________________________________________________________
Displays or sets the search algorithm for buffer memory.

When set to 'on' the search is always started from the beginning
of the free list.  This is slower but keeps memory fragmentation
to a minimum.

When set to 'off', the search is started from the end, accounting
for more memory fragmentation but keeping speed.

(Rumours state that you should include this command as the first
line in /autoexec.nos.  The current releases set the 'efficient'
default to 'yes').

>> Example:  memory efficient off


_________________________________________________________________
memory free
_________________________________________________________________
Display the storage allocator free list.  Each entry consists of
a starting address, in hex, and a size, in decimal bytes.


_________________________________________________________________
memory garbage
_________________________________________________________________
Start garbage collection.  Warning: This does not work as
advertised.


_________________________________________________________________
memory ifbufsize [<bytes>]                          Default: 2048
_________________________________________________________________
Display or set the size of the buffers in the interrupt buffer
pool.

The size should be set to the largest type of buffer plus a
header size of 22.

For example: If AX.25 is the only interface and a packet length
of 256 is defined, the 'ibufsize' should be 256 + 10 * 6 + 22.
The 10 * 6 is the AX.25 header (source, destination and 8
digipeaters).

>> Example:  memory ifbufsize 338


_________________________________________________________________
memory minheap [<number>]
_________________________________________________________________
Display or set the minimum heap size to be allocated before shell
escaping to DOS.  This assures a free heap so that NOS can run
without getting short on memory for a while.


_________________________________________________________________
memory nibufs [<n>]                                    Default: 5
_________________________________________________________________
Display or set the number of buffers in the interrupt buffer
pool.

If the number of buffers is set, the statistics in the memory
status display are reset for number of interrupt buffer fails.
The minimum available value is set to the requested number of
buffers.

A rule of thumb for the number of buffers is to watch the
statistics and keep a minimum of 2 free buffers.  Increase or
decrease as required.

>> Example:  memory nibufs 10


_________________________________________________________________
memory sizes
_________________________________________________________________
Display a histogram of storage allocator request sizes.  Each
histogram bin is a binary order of magnitude (i.e. a factor of
2).


_________________________________________________________________
memory status
_________________________________________________________________
Display a summary of storage allocator statistics.

The first line shows the base address of the heap, its total
size, the amount of heap memory available in bytes and as a
percentage of the total heap size, and the amount of memory left
over (i.e. not placed on the heap at startup) and therefore
available for shell subcommands.

The second line shows the total number of calls to allocate and
free blocks of memory, the difference of these two values (i.e.
the number of allocated blocks outstanding), the number of
allocation requests that were denied due to lack of memory, and
the number of calls to 'free' that attempted to free garbage
(e.g. by freeing the same block twice or freeing a garbled
pointer).

The third line shows the garbage collection status.

The fourth line shows the number of calls to 'malloc' and 'free'
that occurred with interrupts  off.  In normal situations these
values should  be zero.

The fifth line shows the current setting of the interrupt buffer
pool, its minimal value and the number of failed buffer requests.


_________________________________________________________________
memory threshold [<bytes>]                          Default: 8192
_________________________________________________________________
Display or set the memory threshold size in bytes.

If available memory falls below this value, no more new sessions
are started or accepted.

>> Example:  memory threshold 4096
