We've demonstrated that, within its operational framework, one can indeed query and set per-process resource limits using frontends, such as ulimit, prlimit(1), as well as programmatically via library and system call APIs. However, the changes we wrought are temporary—for that process's life or the session's life only. How does one make a resource limit value change permanent?
The Unix way is to use (ASCII-text) configuration files that reside on the filesystem. In particular, on most Linux distributions, editing the /etc/security/limits.conf configuration file is the answer. We shall not delve further into the details here; if interested, check out the man page on limits.conf(5).