Enable/disable a large stack space for long strings.
Caché allocates a fixed amount of space to hold the results of string operations, the string stack. If a string expression exceeds the amount of space allocated, a <STRINGSTACK> error results.
The EnableLongStrings setting is available, if needed, to significantly increase the size of the string stack. The value may be 1 or 0:
When you turn on long strings, every process begins with a larger fixed-size string stack. The string stack is for temporary string handling during a command. When you actually store a long string in a variable, the system allocates new memory for it. (There is optimization for two variables storing the same long string to point to the same malloc()
'd memory (until one of them changes)). When you store a normal string (less than 32k) it comes out of the process buddy block memory (bbsiz
, aka max mem per process), even when long strings are turned on.
When a process uses a long string, the memory for the string comes from malloc()
instead of from the partition memory. Thus the $STORAGE value is not affected. When the string is killed, Cache releases (with free()) the memory that it got from malloc()
for the long string. (Note that this is different for HPUX. HPUX does not release the memory; the process on HPUX retains the memory after free()
and that memory becomes available for a subsequent malloc()
. If that memory were never used again, it is eventually paged out by the HPUX memory manager (assuming there was some shortage of physical memory).
The value of this setting affects only Caché jobs started after it is changed. Existing jobs are not affected and maintain their current string stack size.
Range of Values
0 or 1. The default is 1.
© 1997-2019 InterSystems Corporation, Cambridge, MA