4.6. Dynamic Libraries Loading

4.6. Dynamic Libraries Loading

When developing your MRG Realtime program, consider resolving symbols at startup. Although it can slow down program initialization, it is one way to avoid non-deterministic latencies during program execution.

Dynamic Libraries can be instructed to load at system startup by setting the LD_BIND_NOW variable with ld.so, the dynamic linker/loader.

The following is an example shell script. This script exports the LD_BIND_NOW variable with a non-null value of 1, then runs a program with a scheduler policy of FIFO and a priority of 1.

#!/bin/sh
	
LD_BIND_NOW=1
export LD_BIND_NOW
	
chrt --fifo 1 /opt/myapp/myapp-server &

Related Manual Pages

For more information, or for further reading, the following man pages are related to the information given in this section.