Memory allocation reconsideration in q2v.py