to complete __AllocateInputEvents and __AllocateFreeEvents