Sign in Join
FPDoc Onlineexperiment

Fpmprotect function

In unit BaseUnix

Set memory protection.

Declaration

pascal
function Fpmprotect(start: pointer; len: size_t; prot: cint): cint

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).

An experiment, built from development snapshots. Not the official Free Pascal or Lazarus documentation.