Skip to content

Fpmprotect

Set memory protection.

Declaration

Source position: bunxh.inc line 120

function Fpmprotect(start: pointer; len: size_t; prot: cint) : cint;external name 'FPC_SYSC_MPROTECT';

Description

fpmprotect sets memory protection on a certain block of memory. The memory block to protect starts at adr and has size len. The prot argument specifies the kind of protection to apply, and is a bit-wise OR-ed combination of the following:

PROT_NONE
Memory cannot be accessed
PROT_READ
Memory can be read
PROT_WRITE
Memory can be written
PROT_EXEC
Memory can be executed
PROT_SEM
Memory can be used for atomic operations
PROT_SAO
Memory must have strong access order (powerPC only).