I'm not familiar with this topic, but I can point you to what WebKit does:

https://trac.webkit.org/browser/webkit/trunk/Source/WebKit/UIProcess/linux/MemoryPressureMonitor.cpp
https://trac.webkit.org/browser/webkit/trunk/Source/WTF/wtf/linux/MemoryPressureHandlerLinux.cpp
https://trac.webkit.org/browser/webkit/trunk/Source/WTF/wtf/linux/CurrentProcessMemoryStatus.cpp

Hope that's useful....