I use the solution provided in https://askubuntu.com/a/173294/to use RAM storage for the /tmp directory:
code 1:
tmpfs /tmp tmpfs defaults,noatime,nosuid,nodev,noexec,mode=1777,size=512M 0 0
But when I try to run some programs, I get the error
error while loading shared libraries: libz.so.1: failed to map segment from shared object
I managed to solve the problem using the answer provided in https://stackoverflow.com/a/57796840/:
code 2:
sudo mount /tmp -o remount,exec
I have two questions:
(1) What does actually do the code 2? Does it somehow (partially) disable the code 1?
(2) Can one incorporate code 2 to code 1 in order that the above error does not happen? If so, is the code 1 still effective?