memory pool for IdentityEx

This commit is contained in:
orignal 2023-03-16 21:32:53 -04:00
parent 5ad9c8e740
commit 55b2f2c625
7 changed files with 46 additions and 67 deletions

View file

@ -127,6 +127,7 @@ namespace data
&m_RouterInfoAddressVectorsPool, std::placeholders::_1));
};
std::shared_ptr<Lease> NewLease (const Lease& lease) { return m_LeasesPool.AcquireSharedMt (lease); };
std::shared_ptr<IdentityEx> NewIdentity (const uint8_t * buf, size_t len) { return m_IdentitiesPool.AcquireSharedMt (buf, len); };
uint32_t GetPublishReplyToken () const { return m_PublishReplyToken; };
@ -182,6 +183,7 @@ namespace data
i2p::util::MemoryPoolMt<RouterInfo::Address> m_RouterInfoAddressesPool;
i2p::util::MemoryPoolMt<RouterInfo::Addresses> m_RouterInfoAddressVectorsPool;
i2p::util::MemoryPoolMt<Lease> m_LeasesPool;
i2p::util::MemoryPoolMt<IdentityEx> m_IdentitiesPool;
};
extern NetDb netdb;