release the events array
let the 'events' array be a member of the iomux struct

instead of allocating/releasing it at each runcycle