Your Browser is not longer supported

Please use Google Chrome, Mozilla Firefox or Microsoft Edge to view the page correctly
Loading...

{{viewport.spaceProperty.prod}}

CSTAT - Change page status

&pagelevel(3)&pagelevel

General

Application area:

Working with virtual memory; see "Working with virtual memory"
Memory pools; see "Common memory areas shared by several users (Memory pools)"

Macro type:

Type S, MF format 1: standard/E/L form; see "S-type macros"


The operating system manages virtual storage on a page basis (among other things, this involves paging, memory protection, requests for pages in memory and their release).
One page of memory is 4 K (=4096 bytes). Space is assigned to the user program in class 6 memory in page-sized portions.

Macro description

The CSTAT macro enables users to amend the attributes of the pages assigned to their program in class 6 memory in relation to

  • paging management (whether the pages are resident or pageable)

  • mode of access (read/write access)

  • special access protection (accesses via AID or DUMP only allowed with special privilege).

For memory pages which are in a memory pool, the following points should be noted:

  • Memory pages in a resident memory pool can be made nonpageable by a CSTAT call (see also the macro ENAMP). When the macro is executed, only those pages which lie outside the memory pool are affected.

  • Memory pages in a nonresident memory pool can be made resident and subsequently pageable again by any memory pool user issuing CSTAT.

  • Where changes to access rights are concerned, the CSTAT macro has a lower priority than the CSTMP macro:
    A write protection set up for a memory pool using CSTMP cannot be removed (page by page) using CSTAT; this even applies to pages whose write protection was set up using CSTAT before the call to CSTMP.

Macro format and description of operands

CSTAT

PGNUM=value / ALL / (r)

[,ACCESS=READ / WRITE / (r)]

[,PAGE=YES / NO / (r)]

[,PROTECT=YES]

[,MF=(E,..) / L]

PGNUM=
Specifies the page number(s) of the page(s) whose status is to be amended in respect of paging, mode of access or special access protection. In addition to PGNUM, at least one further operand must be specified. A call to CSTAT containing only PGNUM=.... is meaningless, and will result in the error flag (return code value) X'0C'.

value
Page number of the page whose status is to be amended.

ALL
The status of all the pages used by the program is to be amended. The operand PGNUM=ALL must only be used in combination with PAGE=...

(r)
Register which contains the page number (value) or the parameter ALL (X'40C1D3D3'); (2 <= r <= 12).

ACCESS=
Determines whether the specified pages may be accessed only for reading, or may also be written to (write access implies permission to read).

Notes

  • ACCESS=... must not be specified in combination with PGNUM=ALL.

  • Memory pool: a write protection established by CSTMP cannot be removed using CSTAT.

    READ
    Only read access is allowed.

    WRITE
    Write access is allowed.

    (r)
    Register which contains the parameter YES (X'40E8C5E2) or NO (X'4040D5D6').

    YES:

    write access allowed.

    NO:

    only read access allowed.

PAGE=

Specifies whether the memory pages are to be pageable or resident.

YES
The memory page(s) is (are) to be pageable.
Memory pages which are part of a resident memory pool are unaffected.

NO
The memory page(s) is (are) to be resident.
The maximum number of pages that can be made resident is limited by the operand RESIDENT-PAGES=PARAMETERS(MINIMUM=...) in the command START-PROGRAM or LOAD-PROGRAM.

Note
If memory saturation should occur, the following steps can be taken:

  • Any pending CSTAT requests for resident memory pages are rejected (in spite of this, the value of the return code will be X'00').

  • Some of those memory pages of a program which have already been made resident with CSTAT may be made pageable by the operating system (their resident status will not automatically be restored later).

(r)
Register containing the parameter YES (X'40E8C5E2') or NO (X'4040D5D6'); (2 <= r <= 12).

PROTECT=
Specifies a special access protection for the memory page.

Notes

  • PROTECT=YES must not be used in combination with PGNUM=ALL or ACCESS=....

  • Any access protection set up using PROTECT can only be removed by releasing the memory page (RELM). This will cause the contents of the page to be deleted!

    YES
    Accesses to the memory page by the debugging aid AID are only permitted if special privilege is assigned. The same is true for a memory dump.

MF=
For a general description of the MF operand, its operand values and any subsequent operands (e.g. for a prefix), see "S-type macros". The valid MF values are given at the start of the macro description under “Macro type” and are included in the macro format.

Return information and error flags

During execution, the register R1 contains the address of the operand list.

R15:

+---------------+

|   |   |   |   |
| | | | | | |a|a|
+---------------+

A return code relating to the execution of the CSTAT macro is transferred in the rightmost byte of register R15.

X'aa'

Meaning

X'00'

Normal execution

X'04'

The specified page does not belong to the program, and was also not requested using REQM

X'0C'

Operand error

X'10'

The program has attempted to make more pages resident then were reserved for it in the
START- or LOAD-EXECUTABLE-PROGRAM command (operand RESIDENT-PAGES)