The HEAPSTACK command specifies or displays the process stack and the heap offset used by the HEAP command.
The heap offset is measured relative to the mark stack control word (MSCW) at lexical level (lex level) 2 in the process stack. The default heap offset is 2, but the actual heap offset can vary depending on whether the program contains modules and depending on the version of the Pascal compiler used.
Syntax
── HEAPSTACK ─┬────────────────────────────┬───────────────────────────► └─<hexadecimal stack number>─┘ ►─┬────────────────────────────────┬───────────────────────────────────┤ └─ OFFSET ──<hexadecimal offset>─┘
Explanation
The following text describes the meaning of each construct:
HEAPSTACK
Displays the hexadecimal stack number of the process stack currently targeted for all HEAP commands, and the hexadecimal offset used to locate the heap descriptor.
HEAPSTACK <hexadecimal stack number>
Specifies the process stack to be used as the target for all HEAP commands. The hexadecimal offset is reset to its default value of 2.
HEAPSTACK OFFSET <hexadecimal offset>
Specifies the offset of the heap descriptor relative to the MSCW at lex level 2.
HEAPSTACK <hexadecimal stack number> OFFSET <hexadecimal offset>
Specifies the process stack and offset to be used for subsequent HEAP commands.
The HEAPSTACK command displays an error message if the specified process stack is of the wrong type or in the wrong state for use in a HEAP command. Various output examples for the HEAPSTACK command are shown in Examples 1 through 4.
Example 1
The following example specifies stack 1DE as the target and causes the default offset of 2 to be used. The response indicates that DUMPANALYZER found a nonseparate heap at the default offset.
INPUT: HEAPSTACK 1DE HEAPSTACK = 1DE, Compiled by level 44.232 Pascal, BOSR = 7B83B Separate Heaps are not in use Non Separate Heap row 0 in use (Default heap size),Top Of Heap is 6F System Page Size is 100 (256) words
Example 2
In the following examples, the user first specifies stack 1E0 as the target and causes the default offset of 2 to be used. The response indicates that a heap descriptor does not exist at that offset, and suggests that an offset of 2A be used instead. The user reenters the HEAPSTACK command, specifying an offset of 2A. The response indicates that DUMPANALYZER found a heap descriptor at that location.
INPUT: HEAPSTACK 1E0 HEAPSTACK = 1E0, Compiled by level 44.232 Pascal, BOSR = B9A80 Non Separate Heap Seg Dope not present at (2,2) Failure loading heap information. Please specify the offset of the Non Separate Heap Array. Possible offset(s): 2A INPUT: HEAPSTACK OFFSET 2A Separate Heaps are not in use Non Separate Heap row 0 in use (Default heap size),Top Of Heap is 6F System Page Size is 100 (256) words
Example 3
Following is an example of a simple HEAPSTACK command. The response shows the stack number and offset that are currently in use.
INPUT: HEAPSTACK Heapstack = 1E0, BOSR = B9A80 Heapstack Offset = 2A
Example 4
In the following example, the HEAPSTACK command specifies both the stack number and the offset. The response indicates that DUMPANALYZER found the heap descriptor at the specified offset.
INPUT: HEAPSTACK 510 OFFSET 2A HEAPSTACK = 510, Compiled by level 44.232 Pascal, BOSR = 6E8B 3 (3) Separate heaps in use Non Separate Heap row 0 in use(Default heap size),Top Of Heap is 6F System Page Size is 100 (256) words