$MEMORY
Control memory allocation for Uniface application.
$MEMORY {=
} USMFREE=
MinimumUnusedMemory | nofree
{,
MAXINST=
MaximumInstanceMemory |
NOMAX
} {ZIP=
{ON
} | OFF
|
ALL
}
Arguments
Argument | Description | Windows Default |
---|---|---|
USMFREE | Minimum amount of unused Uniface
Segmented Memory (USM) that Uniface needs to have available; Uniface frees unused USM memory above
this amount. The value of
MinimumUnusedMemory can be expressed in bytes, kilobytes (K) or megabytes (M).
For example, If set to |
|
MAXINST | Set the maximum memory pool available for component instances. The default is 32768 bytes (32K). The minimum value is 1024 bytes (1K) | maxinst=32768
|
ZIP | Determine whether ZIP files (including
UARs) are mapped to memory. Possible values are:
|
|
Assignment file: | client assignment files |
Section: | [SETTINGS] |
Default value: | Depends on platform |
USMFREE
The $MEMORYUSMFREE
setting enables you to set the minimum amount of unused USM memory that
Uniface must have available to it.
For normal operation, Uniface requires only a few megabytes of memory. However, it occasionally needs to claim more memory, for example, to load and display a big picture, and then doesn't need this claimed memory anymore. This claimed but unused, memory gives Uniface fast access to memory when it needs it, but makes it unavailable to other programs.
MAXINST
Uniface can create a maximum of 4096 component instances, which consumes 32768 bytes of memory. After this point, an out-of-memory error occurs. It is unusual for such a large number of instances to be required, and reaching this maximum often indicates an instance leak, such as a loop in ProcScript that creates, but does not destroy, instances.
However, there may be circumstances when such a
large number of instances are needed. In this case you can use the MAXINST
option
to specify the maximum. You can specify the number as bytes or as kilobytes, for example
MAXINST=32768
or MAXINST=32K
.
Setting the value to NOMAX
allows
Uniface to consume all resources on the system.
ZIP
By default, Uniface maps the central directory (table of contents) of ZIP files (such as UAR files) into memory. When Uniface needs a piece of the file, it looks at this memory, which triggers a page-fault, causing the OS to read in that page of the file as if it were a piece of memory that was swapped to disk. Thus, only those pages that are actually addressed by Uniface are read, even though the whole file is mapped to memory.
The central directory is always read in its entirety, but the rest is only accessed if a particular zipped file is needed from the ZIP archive. This improves the performance when applications access these files.
Memory is released as soon as the central
directory has been processed. However, if $MEMORY ZIP=ALL
has been specified, the
memory is not released until the zip file is closed. For UAR files, this is typically when the
application or Uniface Server ends.
If the application environment has memory
resource limitations, you can set $MEMORY ZIP=OFF
to prevent this behavior.
On iSeries, memory mapping works only on files in the IFS, not for physical files that reside in a library. For such files, normal file I/O is used.
$MEMORY
$MEMORY usmfree=65535 ; Free only when more than 65535 bytes of complete USM clusters are unused
$MEMORY usmfree=100K ; Free only when more than 100 kilo bytes of complete USM clusters are unused
$MEMORY usmfree=1M ; Free only when more than 1 megabyte of complete USM clusters are unused
$MEMORY usmfree=nofree ; Never free USM memory, as in V8
$MEMORY maxinst=80K ;reserve 80 kilobytes for component instances