Standard r-code execution environment
- Last Updated: February 11, 2026
- 2 minute read
- OpenEdge
- Version 13.0
- Documentation
At run time, OpenEdge manages the execution of r-code from either an operating system file, a standard procedure library, or an archive file using the following components:
- Execution buffer — The portion of local memory that OpenEdge allocates and uses to store the chain of loaded r-code segments for all procedures executing in local memory.
- R-code swap file (rcd) — A file that OpenEdge uses to dynamically swap r-code segments in and out of the execution buffer.
- Segment descriptor table — An in-memory table that references the r-code segments required by all executing procedures, including the location of each r-code segment in the execution buffer and usage count information.
- R-code directory — An in-memory table that contains information about each executing r-code, including r-code size, usage count, segment descriptions, and a reference to the segment descriptor table for each segment.
OpenEdge uses the segment descriptor table and the r-code directory to manage r-code from operating system files, standard procedure libraries, memory-mapped procedure libraries, and archive files.
The following image shows the layout for the standard r-code execution environment.

In the above image, OpenEdge located and loaded the cust.r and orders.r files into local memory from
either operating system files, standard procedure libraries, or archives. The execution buffer
is shown with three cust.r segments and two orders.r segments. Note that one orders.r segment is located in the execution buffer, while the other segment is
swapped to the r-code swap file (rcd). When space in the
execution buffer is needed for new r-code segments, OpenEdge uses the r-code swap file to swap
out the least-recently used segments. When OpenEdge needs a segment that has been swapped to
the r-code swap file, it reloads the segment from the r-code swap file into the execution
buffer.