Skip to main content

zfheap

Size and configuration of the $ZF heap.

Synopsis

[config]    zfheap=a,b

Description

The $ZF heap is used for output parameters in a callout function using $ZF. For details, see the chapter “Creating a Caché Callout Library” in Using the Caché Callout Gateway.

Two comma-separated values configure the $ZF heap. From left to right:

  • zfstrsz is the number of characters Caché allows for a single string parameter on the $ZF heap. How many bytes this actually requires depends on whether you are using 8-bit characters, Unicode (2-byte characters), or 4-byte characters on UNIX®. The range is 0–32767. A value of 0 tells Caché to determine an appropriate value for zfstrsz automatically. The default is 32767 characters.

  • zfheapsz is the number of bytes Caché allocates for the $ZF heap for all purposes. The $ZF heap consists of the total number of bytes allocated in virtual memory for all $ZF input and output parameters, including the space for strings allowed by the first value. The range is 0–270336 bytes. The default is 0. A value of 0 tells Caché to calculate an appropriate value for zfheapsz automatically, based on the value of zfstrsz.

The formula for calculating zfheapsz based on zfstrsz is as follows:

zfheapsz = (BytesPerCharacter * zfstrsz) + 2050

For example, if zfstrsz has the default value, 32767:

  • If you are using Unicode, a single character is 2 bytes. The value for zfheapsz is then 67584 (or 2 * 32767 + 2050) bytes.

  • On UNIX®, a single character is 4 bytes. The value for zfheapsz is then 133118 (or 4 * 32767 + 2050) bytes.

InterSystems recommends that this parameter be set to 0,0.

Examples

zfheap=32767,67584

Range of Values

As described above.

Management Portal

On the page System Administration > Configuration > Additional Settings > Advanced Memory:

  • For zfstrsz, in the ZFString row, select Edit. Enter a number of characters.

  • For zfheapsz, in the ZFSize row, select Edit. Enter a number of bytes.

FeedbackOpens in a new tab