Allocate astar_path on stack rather than on heap.