FUNCTION 24 MOVE/EXCHANGE MEMORY REGION
MOVE MEMORY REGION SUBFUNCTION
PURPOSE
This subfunction copies a region of memory in the following memory
source/destination combinations.
o conventional memory to conventional memory
o conventional memory to expanded memory
o expanded memory to conventional memory
o expanded memory to expanded memory
You do not have to save and restore the expanded memory mapping
context to perform these move operations. The current mapping context
is maintained throughout this operation.
The length of the region is limited by the amount of expanded memory
allocated to the handles specified.
However, in most practical applications, the region length will be
considerably smaller. A region length of zero is not an error, and no
move will be performed.
A region length which exceeds 16K bytes is not an error. In this case
the function assumes that a group of logical pages is the target for
the move. The logical page specified represents the first logical
page in which the move will take place. If the region length exceeds
16K bytes, or if the region is less than 16K bytes but spans logical
pages, there must be sufficient logical pages remaining after the
first logical page for the entire region to fit.
If your application needs to save a region of conventional memory in
expanded memory, you can move it without having to perform a save or
restore of the current mapping context.
The memory manager maintains the context. A move of up to 1M byte may
be performed, although practical lengths are substantially less than
this value.
If the source and destination handles are identical, the source and
destination regions are tested for overlap before the move. If they
overlap, the move direction is chosen so that the destination region
receives an intact copy of the source region. A status will be
returned indicating that this overlap has occurred.