Guardian Procedure Calls Reference Manual

At segment resizeAt memory accessAt segment allocateType of segment
reduced if the new size is less
than the highest address of
accessed memory (subject to
change).
Because segment resizing is an extremely resource intensive operation, users should design
their applications so that SEGMENT_RESIZE64_ is not frequently called. A good rule of thumb
is to call SEGMENT_RESIZE64_ only when changing the size of a data segment by more than
128 KB. Changes that resize a data segment by less that 20% should also be avoided.
A shared data segment may be resized to a larger size. SEGMENT_RESIZE64_ does not
permit a currently shared data segment to be made smaller.
Considerations for Privileged Callers
Following a call to SEGMENT_RESIZE64_, any underlying absolute segments allocated to the
specified data segment might change if the resize causes the segment to be extended. Privileged
users must not use absolute addresses to reference locations in any data segment that could
be resized.
Resident cache segments (segment IDs in the range of 2817 through 3071) are not checked
for message system buffers. Resident cache segments should only be allocated by the disk
process.
Example
INT ERROR;
ERROR := SEGMENT_ALLOCATE64_ ( 0, 2048D ): ! 1 page extended
! segment
.
.
.
! extend segment to 65 pages
IF ( ERROR := SEGMENT_RESIZE64_( 0, 65D * 2048D ) ) THEN...
! an error occurred, ERROR has the error code
Related Programming Manual
For programming information about the SEGMENT_RESIZE64_ procedure, see the Guardian
Programmer's Guide.
SEGMENT_RESIZE64_ Procedure 1297