Avoid copying memory unnecessarily when creating IOBuffers