Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ mlock(2) — Sprite KS.390

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

mmap(2)

MLOCK  —  C Library Procedures

NAME

mlock, munlock − lock and unlock pages in memory. 

SYNOPSIS

int mlock(addr, len)
int munlock(addr, len)
caddr_t addr;
int len;

DESCRIPTION

Mlock takes an address range and locks the associated pages into physical memory. 

Munlock takes an address range and unlocks the associated pages so they can be paged out. 

RETURN VALUE

Mlock and Munlock return 0 if they are successful.  Otherwise they return -1 and an error code is returned in errno.

BUGS

These functions don’t have much error checking.  Pages that are locked down and not unlocked may remain unusable after the process terminates. 

SEE ALSO

mmap(2)

Sprite version 1.0  —  November 19, 1989

Typewritten Software • bear@typewritten.org • Edmonds, WA 98026