Dynamically allocate buffers if not specified