<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.vmssoftware.com/index.php?action=history&amp;feed=atom&amp;title=%24LCKPAG</id>
	<title>$LCKPAG - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.vmssoftware.com/index.php?action=history&amp;feed=atom&amp;title=%24LCKPAG"/>
	<link rel="alternate" type="text/html" href="https://wiki.vmssoftware.com/index.php?title=$LCKPAG&amp;action=history"/>
	<updated>2026-04-30T02:23:32Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.43.3</generator>
	<entry>
		<id>https://wiki.vmssoftware.com/index.php?title=$LCKPAG&amp;diff=2478&amp;oldid=prev</id>
		<title>Martin: /* See also */ Add cat</title>
		<link rel="alternate" type="text/html" href="https://wiki.vmssoftware.com/index.php?title=$LCKPAG&amp;diff=2478&amp;oldid=prev"/>
		<updated>2022-03-23T11:17:10Z</updated>

		<summary type="html">&lt;p&gt;&lt;span class=&quot;autocomment&quot;&gt;See also: &lt;/span&gt; Add cat&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 11:17, 23 March 2022&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l77&quot;&gt;Line 77:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 77:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;* [[$ULKPAG]]&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;* [[$ULKPAG]]&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;* [https://support.hpe.com/hpsc/doc/public/display?docId=emr_na-c04621447 OpenVMS Programming Concepts Manual]&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;* [https://support.hpe.com/hpsc/doc/public/display?docId=emr_na-c04621447 OpenVMS Programming Concepts Manual]&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;[[Category:System Services]]&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Martin</name></author>
	</entry>
	<entry>
		<id>https://wiki.vmssoftware.com/index.php?title=$LCKPAG&amp;diff=1274&amp;oldid=prev</id>
		<title>Darya.zelenina: Created page with &quot;&#039;&#039;&#039;$LCKPAG&#039;&#039;&#039;, or &#039;&#039;&#039;Lock Pages in Memory&#039;&#039;&#039;, is a system service that locks a page or range of pages in memory.  =Description=  The Lock Pages in Memory se...&quot;</title>
		<link rel="alternate" type="text/html" href="https://wiki.vmssoftware.com/index.php?title=$LCKPAG&amp;diff=1274&amp;oldid=prev"/>
		<updated>2019-07-24T16:12:26Z</updated>

		<summary type="html">&lt;p&gt;Created page with &amp;quot;&amp;#039;&amp;#039;&amp;#039;$LCKPAG&amp;#039;&amp;#039;&amp;#039;, or &amp;#039;&amp;#039;&amp;#039;Lock Pages in Memory&amp;#039;&amp;#039;&amp;#039;, is a &lt;a href=&quot;/System_Service&quot; title=&quot;System Service&quot;&gt;system service&lt;/a&gt; that locks a page or range of pages in memory.  =Description=  The Lock Pages in Memory se...&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;&amp;#039;&amp;#039;&amp;#039;$LCKPAG&amp;#039;&amp;#039;&amp;#039;, or &amp;#039;&amp;#039;&amp;#039;Lock Pages in Memory&amp;#039;&amp;#039;&amp;#039;, is a [[System Service|system service]] that locks a page or range of pages in memory.&lt;br /&gt;
&lt;br /&gt;
=Description=&lt;br /&gt;
&lt;br /&gt;
The Lock Pages in Memory service locks a page or range of pages in memory. The specified virtual pages are forced into the working set and then locked in memory.&lt;br /&gt;
&lt;br /&gt;
A locked page is not swapped out of memory if the working set of the process is swapped out. These pages are not candidates for page replacement and in this sense are locked in the working set as well.&lt;br /&gt;
&lt;br /&gt;
If more than one page is being locked and you need to determine specifically which pages were previously locked, the pages should be locked one at a time. If an error occurs while the $LCKPAG service is locking pages, the return array, if requested, indicates the pages that were successfully locked before the error occurred. If no pages are locked, both longwords in the return address array contain the value –1.&lt;br /&gt;
&lt;br /&gt;
On [[Alpha]] and [[I64|Integrity]] systems, if you are attempting to lock executable code, you should issue multiple $LCKPAG calls: one to lock the code pages and others to lock the linkage section references into these pages.&lt;br /&gt;
&lt;br /&gt;
=Syntax=&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;SYS$LCKPAG &amp;lt;/nowiki&amp;gt;[[#inadr|inadr]]&amp;lt;nowiki&amp;gt; ,[&amp;lt;/nowiki&amp;gt;[[#retadr|retadr]]&amp;lt;nowiki&amp;gt;] ,[&amp;lt;/nowiki&amp;gt;[[#acmode|acmode]]&amp;lt;nowiki&amp;gt;]&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
C Prototype:&lt;br /&gt;
&lt;br /&gt;
 int sys$lckpag (struct _va_range *inadr, struct _va_range *retadr, unsigned &lt;br /&gt;
                 int acmode);&lt;br /&gt;
&lt;br /&gt;
=Arguments=&lt;br /&gt;
&lt;br /&gt;
==inadr==&lt;br /&gt;
{{SyservArgument|address_range|longword (unsigned)|read only|by reference}}&lt;br /&gt;
&lt;br /&gt;
Starting and ending virtual addresses of the range of pages to be locked. The inadr argument is the address of a 2-longword array containing, in order, the starting and ending process virtual addresses. Only the virtual page number portion of each virtual address is used; the low-order byte-within-page bits are ignored.&lt;br /&gt;
&lt;br /&gt;
On [[VAX]] systems, if the starting and ending virtual addresses are the same, a single page is locked.&lt;br /&gt;
&lt;br /&gt;
==retadr==&lt;br /&gt;
{{SyservArgument|address_range|longword (unsigned)|write only|by reference}}&lt;br /&gt;
&lt;br /&gt;
Starting and ending process virtual addresses of the pages that $LCKPAG actually locked. The retadr argument is the address of a 2-longword array containing, in order, the starting and ending process virtual addresses.&lt;br /&gt;
&lt;br /&gt;
==acmode==&lt;br /&gt;
{{SyservArgument|access_mode|longword (unsigned)|read only|by value}}&lt;br /&gt;
&lt;br /&gt;
Access mode to be associated with the pages to be locked. The acmode argument is a longword containing the access mode. The [[$PSLDEF]] macro defines the four access modes.&lt;br /&gt;
&lt;br /&gt;
The most privileged access mode used is the access mode of the caller. For the $LCKPAG service to complete successfully, the resultant access mode must be equal to or more privileged than the access mode already associated with the pages to be locked.&lt;br /&gt;
&lt;br /&gt;
=Condition Values Returned=&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! colspan=&amp;quot;col&amp;quot; | Value&lt;br /&gt;
! colspan=&amp;quot;col&amp;quot; | Description&lt;br /&gt;
|-&lt;br /&gt;
| SS$_WASCLR &lt;br /&gt;
| The service completed successfully. All of the specified pages were previously unlocked.&lt;br /&gt;
|-&lt;br /&gt;
| SS$_WASSET &lt;br /&gt;
| The service completed successfully. At least one of the specified pages was previously locked.&lt;br /&gt;
|-&lt;br /&gt;
| SS$_ACCVIO &lt;br /&gt;
| The input array cannot be read; the output array cannot be written; the page in the specified range is inaccessible or nonexistent; or an attempt to lock pages was made by a caller whose access mode is less privileged than the access mode associated with the pages.&lt;br /&gt;
|-&lt;br /&gt;
| SS$_LCKPAGFUL &lt;br /&gt;
| The system-defined maximum limit on the number of pages that can be locked in memory has been reached.&lt;br /&gt;
|-&lt;br /&gt;
| SS$_LDWSETFUL &lt;br /&gt;
| The locked working set is full. If any more pages are locked, not enough dynamic pages will be available to continue execution.&lt;br /&gt;
|-&lt;br /&gt;
| SS$_NOPRIV &lt;br /&gt;
| The process does not have the privilege to lock pages in memory.&lt;br /&gt;
|-&lt;br /&gt;
| SS$_PAGOWNVIO &lt;br /&gt;
| The pages could not be locked because the access mode associated with the call to $LCKPAG was less privileged than the access mode associated with the pages that were to be locked.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=Required Access or Privileges=&lt;br /&gt;
The calling process must have PSWAPM privilege to lock pages into memory.&lt;br /&gt;
&lt;br /&gt;
=Required Quota=&lt;br /&gt;
None&lt;br /&gt;
&lt;br /&gt;
=See also=&lt;br /&gt;
* [[$ULKPAG]]&lt;br /&gt;
* [https://support.hpe.com/hpsc/doc/public/display?docId=emr_na-c04621447 OpenVMS Programming Concepts Manual]&lt;/div&gt;</summary>
		<author><name>Darya.zelenina</name></author>
	</entry>
</feed>