Previously the code allocated its own temporary memory, but it's possible to just use the existing shared one instead.