Guardian Procedure Calls Reference Manual

SEGMENT_GET_MIN_ALIGN_ Procedure
Summary
Syntax for C Programmers
Syntax for TAL Programmers
Parameter
Returned Value
Minimum Permissible Alignments for 64-bit Segments
Summary
The SEGMENT_GET_MIN_ALIGN_ procedure computes the minimum permissible alignment for a
64-bit segment of a given size. SEGMENT_ALLOCATE64_ rejects an attempt to allocate a 64-bit
segment with a specified base-address that does not satisfy the minimum alignment for its
max-size. For a 32-bit segment, the minimum alignment enforced is one page, 2
14
= 16384
bytes, but alignment narrower than that reported by this procedure is not recommended.
NOTE: The SEGMENT_GET_MIN_ALIGN_ procedure is supported on systems running H06.20
and later H-series RVUs and J06.09 and later J-series RVUs, but the reported values changed at
the H06.21 and J06.10 RVUs.
Syntax for C Programmers
#include <kmem.h>
int SEGMENT_GET_MIN_ALIGN_ ( uint64 size );
Syntax for TAL Programmers
?SOURCE $SYSTEM.SYSTEM.KMEM
result := SEGMENT_GET_MIN_ALIGN_ ( size ); ! i
Parameter
size
input
INT(64):value
is the size of the segment.
Returned Value
INT
The log (base 2) of the minimum permissible alignment for a segment of the given size. See Minimum
Permissible Alignments for 64-bit Segments below.
1282 Guardian Procedure Calls (S)