Move mem monitoring to poll library.