mirror of
https://github.com/PurpleI2P/i2pd.git
synced 2025-04-28 11:47:48 +02:00
memory pool for RouterInfo buffer
This commit is contained in:
parent
ae5cb3bbe7
commit
f567417bb3
4 changed files with 27 additions and 20 deletions
|
@ -30,6 +30,7 @@
|
|||
#include "NetDbRequests.h"
|
||||
#include "Family.h"
|
||||
#include "version.h"
|
||||
#include "util.h"
|
||||
|
||||
namespace i2p
|
||||
{
|
||||
|
@ -120,6 +121,7 @@ namespace data
|
|||
size_t VisitRandomRouterInfos(RouterInfoFilter f, RouterInfoVisitor v, size_t n);
|
||||
|
||||
void ClearRouterInfos () { m_RouterInfos.clear (); };
|
||||
std::shared_ptr<RouterInfo::Buffer> NewRouterInfoBuffer () { return m_RouterInfoBuffersPool.AcquireSharedMt (); };
|
||||
|
||||
uint32_t GetPublishReplyToken () const { return m_PublishReplyToken; };
|
||||
|
||||
|
@ -175,6 +177,8 @@ namespace data
|
|||
|
||||
std::set<IdentHash> m_PublishExcluded;
|
||||
uint32_t m_PublishReplyToken = 0;
|
||||
|
||||
i2p::util::MemoryPoolMt<RouterInfo::Buffer> m_RouterInfoBuffersPool;
|
||||
};
|
||||
|
||||
extern NetDb netdb;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue