Guardian Procedure Calls Reference Manual (G06.25+)

Guardian Procedure Calls (S)
Guardian Procedure Calls Reference Manual522629-013
14-17
SEGMENT_ALLOCATE_ Procedure
To satisfy various hardware and software constraints and requirements for finding
addresses within the virtual memory space, the space is divided into regions,
segments, and pages.
Examples
error := SEGMENT_ALLOCATE_ ( segment^id, seg^size );
! standard call to create a user segment
error := SEGMENT_ALLOCATE_ ( segment^id, , , error^detail,
pin );
! allocates a shared segment, using the PIN
! method, which is shared with the segment given by
! segment^id in the process identified by pin.
error := SEGMENT_ALLOCATE_ ( segment^id, , filename:length,
error^detail, , 2 );
! allocates a shared segment using the filename
! method
Related Programming Manual
For programming information about the SEGMENT_ALLOCATE_ procedure, see the
Guardian Programmer’s Guide.
Unit Contains Size of Unit
1 TNS page 2048 bytes 2048 bytes
1 unitary segment 64 TNS
pages
64*2048 bytes = 128 kilobytes
1 Native page process
dependent
4096 or 16384 bytes
1 Native region 256
segments
256*128 kilobytes = 32 megabytes
1 gigabyte 32 regions 32*32 megabytes = 1024
megabytes
2 gigabytes 64 regions 64*32 megabytes = 2048
megabytes