[tor-commits] [tor/master] update tor_allocate and add tests