Memory Management

You can configure the default memory allocation behavior in RTX64 to use local memory or to request memory from Windows. When Use local memory is selected, the Subsystem, networking components, and each RTSS process has two memory allocation spaces (MSpaces): an internal MSpace used for internal subsystem objects and bookkeeping, and a configurable external MSpace used for explicit-process memory allocation. Within each allocation space, there is a local pool and a pool cache to fulfill various memory requests. The local pool is used to deterministically fulfill the memory request from pool cache or directly fulfill requests from the application when larger memory amounts are needed. The pool cache is used to speed up allocating/freeing of small size requests. It acts as an allocator’s cache with a configurable granularity of memory blocks, which are allocated from local pool.

You can allocate (reserve) an initial amount of memory in advance in the external allocation space of a process at its startup. Otherwise, memory will be allocated on the application’s first memory allocation call. An RTSS application that allocates memory from the local pool or pool cache will receive memory deterministically as long as the local pool has enough memory available. The local pool provides deterministic behavior for normally non-deterministic functions, as well as greater flexibility and functionality after a system crash (blue screen).

Use the Control Panel to configure default memory allocation behavior:

RELATED Topics: