Modified inefficient stack allocation.