Guardian Procedure Calls Reference Manual
For a flat segment, the value must be in the range 1 byte through the maximum size defined
by the max-size parameter of the SEGMENT_ALLOCATE_ procedure.
For a selectable segment, the value must be in the range 1 byte through 127.5 megabytes
(133,693,440 bytes).
Returned Value
INT
A file-system error code that indicates the outcome of the call:
Unable to allocate page table space (not returned for unaliased segments).-2
Unable to allocate segment space.-1
Successful call; the size of the specified data segment has been changed to new-segment-size.0
segment-id specified a nonexistent data segment, or the segment is of a type that cannot be resized (see
Considerations).
2
Indicates one of these conditions.12
• Because the data segment is a shared segment, the segment cannot be reduced (see Considerations).
• Because an I/O to the segment is in progress, the segment cannot be reduced.
• The segment is being resized.
• There is a lockmemory request on the segment.
An invalid new-segment-size was specified (see new-segment-size, below).21
segment-id specified a privileged segment ID (greater than 2047) and the caller was not privileged.24
A required parameter was not supplied.29
Disk space could not be allocated to accommodate the new-segment-size specified.43
Either the existing permanent swap file or temporary swap file for the data segment is not large enough for
the requested new-segment-size or the Kernel-Managed Swap Facility (KMSF) has insufficient resources
45
in the processor. This error was caused by a wrong calculation of the primary and secondary extent sizes.
For more information on KMSF, see the Kernel-Managed Swap Facility (KMSF) Manual.
Considerations
• A read-only data segment cannot be resized (an attempt to do so results in error 2).
• Memory access breakpoints (MABs) set in the deallocated portion of the data segment are
removed.
• A call to RESIZESEGMENT that shrinks a data segment causes the area beyond the
new-segment-size to be deallocated. Dirty pages are not written back to a permanent
swap file.
• A call to RESIZESEGMENT causes disk extents to be allocated or deallocated (for file-backed
segments), or page reservations to be increased or decreased (for KMSF-backed segments)
in these ways:
At segment resizeAt memory accessAt segment allocateType of segment
Growing: additional extents are
allocated. Shrinking: old extents
Number of allocated extents
does not change.
File extents are
completely allocated.
File-backed
non-extensible segment
are deallocated (subject to
change).
Growing: no additional extents
are allocated. Shrinking: old
Additional extents are
allocated.
One file extent is
allocated (subject to
change).
File-backed extensible
segment
extents are deallocated (subject
to change).
Growing: the number of pages
reserved is adjusted to the new
Number of allocated pages
does not change.
All pages are reserved
at the maximum size.
KMSF-backed
non-extensible segment
RESIZESEGMENT Procedure 1253