Progress
Programming
Handbook


Memory-mapped R-code Execution Environment

At run time, Progress manages the execution of memory-mapped r-code procedures using the following components:

Progress uses the segment descriptor table and the r-code directory to manage r-code procedures from operating system files, standard libraries, and memory-mapped libraries.

Figure A–3 shows the layout for the memory-mapped r-code execution environment.

Figure A–3: Memory-mapped R-code Execution Environment

In Figure A–3, Progress located the cust.r and orders.r files in a memory-mapped library. Note that all r-code segments in a memory-mapped library are located in shared memory. When Progress needs a segment, it executes the segment directly from shared memory.

Memory-Mapped Execution Sequence

When you run a memory-mapped r-code procedure for the first time, Progress loads and executes the procedure as follows:

  1. Opens the procedure library, if not already open, and memory-maps the library in shared memory.
  2. Reads the r-code procedure and creates an r-code directory entry for the procedure.
  3. Registers each required r-code segment in the execution environment as follows:
    1. Adds an r-code segment entry to the segment descriptor table that references the segment in shared memory
    2. Inserts a segment descriptor reference in the r-code directory entry for the procedure
  4. Once the required r-code segments in the procedure are registered in the execution environment, the interpreter begins executing the r-code procedure at the start of the main action code segment and accesses the remaining segments directly from shared memory as required.
Memory-Mapped Execution Environment Limits

The number of memory-mapped r-code procedures that you can run at one time and the shared memory used are determined by the following factors:

Memory-Mapped R-code Segment Management

When Progress needs a memory-mapped r-code segment, it executes the segment directly from shared memory. Progress does not store active memory-mapped r-code segments in the execution buffer. Nor does it swap non-active segments to the session sort file. Progress relies on the operating system to manage the swapping of r-code segments in and out of shared memory.


Copyright © 2004 Progress Software Corporation
www.progress.com
Voice: (781) 280-4000
Fax: (781) 280-4095