Guardian Procedure Calls Reference Manual

At segment resizeAt memory accessAt segment allocateType of segment
size. Shrinking: the number of
pages reserved is reduced
(subject to change).
Growing: no additional pages
are reserved. Shrinking: the
Additional pages are reserved.One page is reserved
(subject to change).
KMSF-backed
extensible segment.
number of pages reserved is
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 RESIZESEGMENT is not frequently called. A good rule of thumb is
to call RESIZESEGMENT 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. RESIZESEGMENT does not permit a
currently shared data segment to be made smaller.
Considerations for Privileged Callers
Following a call to RESIZESEGMENT, 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_ALLOCATE_ ( 0, 2048D ): ! 1 page extended
! segment
.
.
.
! extend segment to 65 pages
IF ( ERROR := RESIZESEGMENT( 0, 65D * 2048D ) ) THEN...
! an error occurred, ERROR has the error code
Related Programming Manual
For programming information about the RESIZESEGMENT procedure, see the Guardian
Programmer's Guide.
1254 Guardian Procedure Calls (R)