======                                              DISview [850]
memory
======

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

>> Example of 'memory freelist' output:
.................................................................
7b910000   16 | 7c2f0000   32 | 7c380008     96 | 7c4b0008    104
7c5f0000   64 | 7dae0008  152 | 7dc60000     32 | 7e280008    624
7e710008 1032 | 7efc0008  584 | 7f6a0008   1576 | 80cd0008  10664
85e30000 4008 |
.................................................................


_________________________________________________________________
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.


>> Example:  memory ifbufsize 4096


_________________________________________________________________
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 YAN can run
without getting short on memory for a while.

>> Example:  memory minheap 16384


_________________________________________________________________
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).

>> Example of 'memory sizes' output:
.................................................................
Storage:                                                                        
N>=    1:    0| N>=    2:   12| N>=    4:   19| N>=    8:   54		
N>=   16:   54| N>=   32:   12| N>=   64:   17| N>=  128:    6		
N>=  256:    9| N>=  512:   34| N>= 1024:   14| N>= 2048:    2		
N>= 4096:    1| N>= 8192:    0| N>=16384:    0| N>=32768:    0		
Mbuf sizes:                                                                     
N>=    1:    0| N>=    2:    0| N>=    4:    0| N>=    8:    0		
N>=   16:    0| N>=   32:    0| N>=   64:    0| N>=  128:    0		
N>=  256:    7| N>=  512:   20| N>= 1024:    0| N>= 2048:    0		
N>= 4096:    0| N>= 8192:    0| N>=16384:    0| N>=32768:    0		
.................................................................


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

>> Example of 'memory status' output:
.................................................................
heap size 29416 avail 1944 (6%) morecores 128 coreleft 210864                   
allocs 212 frees 62 (diff 150) alloc fails 0 invalid frees 0                    
interrupts-off calls to malloc 0 free 0                                         
garbage collections yellow 0 red 0                                              
Intqlen 5 Ibufsize 256 Ibuffail 0                                               
mbuf allocs 15 mbuf frees 4                                                     
pushdown calls 0 pushdown calls to alloc_mbuf 0                                 
.................................................................

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.

The sixth line shows the number of message buffer allocations and
frees.

The seventh line showes the total number of calls to allocate
space to the message buffer chain and the number of new buffer
allocations. If the first buffer has enough space no new memory
needs to be added, otherwise a new buffer allocation is made. 

_________________________________________________________________
memory thresh [<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 thresh 4096
