Home The PMMU functions-handlerThe PMMU functions-handler PMMUversionPMMUversion vmem_sizevmem_size

F.6 SetPageMode

Name: »SetPageMode« - Set PMMU mode for a memory block.
 
Number: 1
 
Declaration: ULONG SetPageMode ( ULONG mode, ULONG start_address, ULONG length );
 
Description: The call SetPageMode sets the PMMU mode for a given block of memory. The following apply:
 
Parameter Meaning
   
mode Mode as a bit-vector
Bit 0 = SwapInhibit
The memory block will not be offloaded
Bit 1 = WriteProtect
The memory block will be write-protected; attempts to write to it lead to a bus error
Bit 2 = Used
The memory block is marked as being in use; by this it temporarily gets a higher priority and is not offloaded at first
Bit 3 = Modified
The memory block is marked as having been modified; due to this the block is written to disk in any case before new data are read into its ophysical address
Bit 4 = CacheInhibit
The processor caches are switched off for the specified block
start_address Start address of memory block
length Length of the desired block

Note: The remaining bits are reserved and must be set to zero. For the virtual memory management the SwapInhibit bit is the most meaningful one, since it offers the possibility of protecting given memory blocks from being offloaded to disk.
 
With write-protection of memory blocks it is imperative to note that the memory is subdivided into pages, which form the smallest unit that can be write-protected. One has to ensure that the write-protection does not extend to a block that must not be protected, because it does not belong to the program in question, for instance.
 
Return value: The function returns zero on error-free execution. Otherwise a value is returned in which the bits that could not be manipulated are set.
 
Group: PMMU functions-handler
 
See also: ClearPageMode   GetHdv_inuse   GetPageSize   pmem_size   PMMUversion   vmem_size
 

Home The PMMU functions-handlerThe PMMU functions-handler PMMUversionPMMUversion vmem_sizevmem_size