Merge pull request #139 from shimaore/pkg_mem_events

Allow for `event_pkg_threshold` support.

Credits go to Stéphane Alnet (shimaore)
(cherry picked from commit 25289f0c2b0f2bd3137dc062a031be359d6e8937)