]> granicus.if.org Git - transmission/commit
(trunk libT) #4209 "Shortcut UDP tracker test" -- the goal of #4209 is to minimize...
authorJordan Lee <jordan@transmissionbt.com>
Wed, 27 Apr 2011 05:03:10 +0000 (05:03 +0000)
committerJordan Lee <jordan@transmissionbt.com>
Wed, 27 Apr 2011 05:03:10 +0000 (05:03 +0000)
commitea3fe42ca3bfa6ec264bc2732f5cb72c63b37ae5
tree8b603e8a88a03c4b41f396fae8de62a65a41f8eb
parente7c76b06eef9563a8947051a7ef96fac64ab53f1
(trunk libT) #4209 "Shortcut UDP tracker test" -- the goal of #4209 is to minimize the cost of the UDP event callback function, so apply the heap pruning eye to that by removing an unnecessary malloc/free call there.

Previously we allocated a 4096 character buffer each time; now we allocate it on the stack. It seems all the distros and OS flavors that Transmission runs on have multi-MB default stack sizes, so a hardwired 4K array should be safe.
libtransmission/tr-udp.c