Guardian Procedure Calls Reference Manual
SEGMENT_ALLOCATE[64]_ Procedures
Summary
Syntax for C Programmers
Syntax for TAL Programmers
Parameters
Returned Value
Considerations
Examples
Related Programming Manual
Summary
The SEGMENT_ALLOCATE[64]_ procedures allocate data segments for use by the calling process.
These procedures can allocate read/write segments, read-only segments, and extensible segments.
SEGMENT_ALLOCATE_ allocates segments only in 32-bit address space; SEGMENT_ALLOCATE64_
also allocates segments in 64-bit address space.
These procedures allocate data segments either by creating new ones, or by sharing segments
already allocated by another process (subject to security requirements).
For selectable segments, the call to SEGMENT_ALLOCATE[64]_ must be followed by a call to the
SEGMENT_USE_ procedure to make the selectable data segment accessible. Although you can
allocate multiple selectable segments, you can access only one at a time. For flat segments, the
call to SEGMENT_ALLOCATE[64]_ can be followed by a call to SEGMENT_USE_, but calling
SEGMENT_USE_ is unnecessary.
NOTE: The SEGMENT_ALLOCATE64_ procedure is supported on systems running H06.24 and
later H-series RVUs and J06.13 and later J-series RVUs. Its use is recommended for new code.
Syntax for C Programmers
#include <cextdecs(SEGMENT_ALLOCATE_)>
short SEGMENT_ALLOCATE_ ( short segment-id
,[ __int32_t segment-size ]
,[ char *filename ]
,[ short length ]
,[ short *error-detail ]
,[ short pin ]
,[ short segment-type ]
,[ __int32_t *base-address ]
,[ __int32_t max-size ]
,[ short alloc-options ] );
#include <kmem.h>
short SEGMENT_ALLOCATE64_ ( short segment-id
,[ int64 segment-size ]
,[ const char _ptr64 *filename ]
,[ short length ]
,[ short _ptr64 *error-detail ]
,[ unsigned short pin ]
,[ short segment-type ]
,[ void _ptr64 * _ptr64 *base-address ]
,[ int64 max-size ]
,[ short alloc-options ] );
SEGMENT_ALLOCATE[64]_ Procedures 1259