Check in original code from the Nagios Exchange by Lukasz Gogolin (lukasz.gogolin@gmail.com)
http://exchange.nagios.org/directory/Plugins/System-Metrics/Memory/check_mem-2Esh/details