LockedMemory - rmu75/linuxcnc-wiki GitHub Wiki
date: '2011-03-07T19:44:13' title: LockedMemory
Resolving the error "failed to map shmem"
If emc displays the following message on startup: RTAPI: ERROR: failed to map shmem RTAPI: Locked memory limit is 32KiB, recommended at least 20480KiB. This can cause the error 'failed to map shmem'. then the problem is the your system's configured limit of locked memory.
Solution
Edit /etc/security/limits.conf with your favorite text editor (e.g., sudo gedit /etc/security/limits.conf). Add the following line * - memlock 20480 For Ubuntu Lucid (10.10), also add the following line at the end of /etc/pam.d/common-session session required pam_limits.so Log out and log back in.
Appendix
To temporarily raise the limit for the current session, use the following command: ulimit -l 20480
To verify the limit is raised, use the following command: ulimit -l