Make io_sample word size agnostic