Override allocateBuffer(...) to allocate a buffer with the correct size right away