ALTDSEG [ MPE/iX Intrinsics Reference Manual ] MPE/iX 5.0 Documentation
MPE/iX Intrinsics Reference Manual
ALTDSEG
NM and CM callable.
Reduces the storage required by the extra data segment when moved into
main memory and expands storage as required, allowing for a more
efficient use of memory. Data segment management (DS) capability is
required.
NOTE Data segment management (DS) intrinsics are not recommended for use
in the operating system native mode programming environment; use of
DS intrinsics degrade program performance.
Syntax
_____________________________________
| |
| U16V I16V I16 |
| ALTDSEG(index,increment,size);|
_____________________________________
Parameters
index 16-bit unsigned integer by value (required)
Indicates the index of the extra data segment,
obtained from the GETDSEG call.
increment 16-bit signed integer by value (required)
Specifies the value, in half words, the extra data
segment is to be changed. A positive value
requests an increase; a negative value requests a
decrease.
size 16-bit signed integer by reference (required)
Returns the new size of the extra data segment
after incrementing or decrementing has occurred.
Operation Notes
Incrementation and decrementation is accomplished in even multiples of
four half words, which are rounded up. For example (in half words):
Present Segment Size Change Value New Segment Size
128 -3 128
128 -4 124
128 +1 132
128 +3 132
128 +4 132
When a data segment is created through GETDSEG, the required virtual
space is allocated by the system to accommodate the original length of
the data segment. This virtual space is allocated in increments of 512
half words. For example, creation of an extra data segment with a length
of 600 half words results in the allocation of 1024 half words of virtual
space.
NOTE ALTDSEG cannot increase the size of a data segment to exceed the
virtual space originally allocated through GETDSEG.
When GETDSEG is called in privileged mode, the ALTDSEG intrinsic must
also be called in privileged mode.
Condition Codes
CCE (2) Request granted.
CCG (0) Request granted. An illegal decrement was
requested to a total segment size of <=0; the
current size remains in affect. An illegal
increment was requested for a total segment size
greater than the virtual space originally assigned;
the size of the virtual space is granted and
returned to the size parameter.
CCL (1) Request denied. An illegal index parameter was
specified.
Additional Discussion
Intrinsics FREEDSEG, GETDSEG
Commands None
Manuals Introduction to MPE XL for MPE V Programmers
(30367-90005)
MPE/iX 5.0 Documentation