This is a big structure (500K) to be allocated on the stack.

Should either allocate it on the heap, or make it smaller (if I understand the call correctly we don't need to be able to process 32K events at the same time.)