Fix size computation in packet allocation.
Implement Sample Event.