fix wakeup profiling to not grow memory usage indefinitely
This commit is contained in:
parent
d9e69db0cb
commit
f6474f5717
|
@ -111,9 +111,14 @@ namespace libtorrent
|
|||
async_t& a = _async_ops[name];
|
||||
TORRENT_ASSERT(a.refs > 0);
|
||||
--a.refs;
|
||||
|
||||
// don't let this grow indefinitely
|
||||
if (_wakeups.size() < 100000)
|
||||
{
|
||||
_wakeups.push_back(wakeup_t());
|
||||
wakeup_t& w = _wakeups.back();
|
||||
w.timestamp = time_now_hires();
|
||||
}
|
||||
#ifdef __MACH__
|
||||
task_events_info teinfo;
|
||||
mach_msg_type_number_t t_info_count = TASK_EVENTS_INFO_COUNT;
|
||||
|
|
Loading…
Reference in New Issue