Returns memory statistics of the process and the system, see MemoryInfo.
If the process runs inside of Docker, the
getMemoryInfogets container memory limits, otherwise it gets system memory limits.
Beware that the function is quite inefficient because it spawns a new process. Therefore you shouldn't call it too often, like more than once per second.