Path: utzoo!attcan!uunet!tank!ncar!asuvax!cs.utexas.edu!rutgers!texbell!texsun!Athena!tim From: tim@Athena.UUCP (Tim Dawson) Newsgroups: comp.unix.wizards Subject: Re: Keeping pages from getting swapped out. Keywords: swapping, vadvise, sticky bits, torn hair Message-ID: <303@Athena.UUCP> Date: 16 Mar 90 19:04:05 GMT References: <38281@cornell.UUCP> Distribution: comp Organization: Motorola FSD, NTSC Dallas, Texas Lines: 26 chandra@thiazi.cs.cornell.edu (Tushar D Chandra) writes: >I'm writing an application in which I need to keep a small process (1-2 pages) >from getting swapped out. ... AS per my references on SysVR3.5, the system call you are looking for is plock() thus: #include int plock (op) int op; Where op is: PROCLOCK - lock test and data segments into memory (process lock) TXTLOCK - leock text segments into memory (text lock) DATLOCK - lock data segment into memory (data lock) UNLOCK - remove locks. This only works for superuser permissions -- ================================================================================ Tim Dawson (...!texsun!Athena!tim) Motorola Computer Systems, Dallas, TX. "The opinions expressed above do not relect those of my employer - often even I cannot figure out what I am talking about."