Memory usage of current process in C

The getrusage library function returns a structure containing a whole lot of data about the current process, including these: long ru_ixrss; /* integral shared memory size */ long ru_idrss; /* integral unshared data size */ long ru_isrss; /* integral unshared stack size */ However, the most up-to-date linux documentation says about these 3 fields (unmaintained) … Read more

How to install php extension using pecl for specific php version, when several php versions installed in system?

Here’s what worked best for me when trying to script this (in case anyone else comes across this like I did): $ pecl -d php_suffix=5.6 install <package> $ pecl uninstall -r <package> $ pecl -d php_suffix=7.0 install <package> $ pecl uninstall -r <package> $ pecl -d php_suffix=7.1 install <package> $ pecl uninstall -r <package> The … Read more