Allow for `event_pkg_threshold` support.

PKG_MEM is not defined or use anywhere else in the code, so assuming `PKG_MALLOC` is meant here.
Merge branch 'pkg_mem_events' into production