Introduction | Difference between user mode and real time programming Memory management TwinCAT has its own memory management, which can also be used in the real-time context. This memory is obtained from what is referred to as the "non-paged pool", which is provided by the operating system. In this memory the TcCOM modules are instantiated with their memory requirement. In addition, the so-called "router memory" is provided by TwinCAT in this memory area, from which the TcCOM modules can allocate memory dynamically in the real-time context (e.g. with the New operator). If possible, memory should generally be allocated in advance, not in the cyclic code.
During each allocation a check is required to verify that the memory is actually available. For allocations in the cyclic code, the execution therefore depends on the memory availability. TwinCAT 3 16 Version: 1.19.1