memoery pool for fragments

This commit is contained in:
orignal 2023-01-14 17:05:09 -05:00
parent d530269e4f
commit 324ace103b
3 changed files with 37 additions and 12 deletions

View file

@ -1788,7 +1788,7 @@ namespace transport
LogPrint (eLogWarning, "SSU2: Fragment number ", fragmentNum, " exceeds ", SSU2_MAX_NUM_FRAGMENTS);
return;
}
auto fragment = std::make_shared<SSU2IncompleteMessage::Fragment> ();
auto fragment = m_Server.GetFragmentsPool ().AcquireShared ();
memcpy (fragment->buf, buf + 5, len -5);
fragment->len = len - 5;
fragment->isLast = isLast;