-
Notifications
You must be signed in to change notification settings - Fork 52
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Local version of #908 #917
Conversation
…oalesced pool size The non-actual high water mark does not include the overallocated size when rounding user allocations up to the alignment. This means that the non-actual high water mark may be too small when repeatedly allocating and deallocating the same sizes in a pool, leading to unnecessary reallocation of the backing buffers.
…nd DynamicPoolList
…ned highwater mark
// Total size allocated (bytes) | ||
std::size_t m_aligned_bytes{0}; | ||
std::size_t m_aligned_highwatermark{0}; | ||
std::size_t m_actual_bytes{0}; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
// Total size allocated (bytes) | |
std::size_t m_aligned_bytes{0}; | |
std::size_t m_aligned_highwatermark{0}; | |
std::size_t m_actual_bytes{0}; | |
std::size_t m_aligned_bytes{0}; // Current size of pool, rounded up to alignment (bytes) | |
std::size_t m_aligned_highwatermark{0}; // Highwatermark of the aligned size (bytes) | |
std::size_t m_actual_bytes{0}; // Total size allocated (bytes) |
std::size_t m_actual_bytes{0}; | ||
std::size_t m_current_size{0}; | ||
std::size_t m_actual_highwatermark{0}; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
std::size_t m_actual_highwatermark{0}; | |
std::size_t m_actual_highwatermark{0}; // Highwatermark of the actual size (bytes) |
std::size_t getActualHighwaterMark() const noexcept; | ||
std::size_t getAlignedSize() const noexcept; | ||
std::size_t getAlignedHighwaterMark() const noexcept; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
std::size_t getActualHighwaterMark() const noexcept; | |
std::size_t getAlignedSize() const noexcept; | |
std::size_t getAlignedHighwaterMark() const noexcept; | |
/* | |
* \brief Returns the Highwatermark of the total size allocated in bytes. | |
*/ | |
std::size_t getActualHighwaterMark() const noexcept; | |
/* | |
* \brief Returns the current size of pool, rounded up to alignment in bytes. | |
*/ | |
std::size_t getAlignedSize() const noexcept; | |
/* | |
* \brief Returns the Highwatermark of the aligned size in bytes. | |
*/ | |
std::size_t getAlignedHighwaterMark() const noexcept; |
@@ -76,8 +76,9 @@ class DynamicPoolList : public AllocationStrategy { | |||
std::size_t getTotalBlocks() const noexcept; | |||
|
|||
std::size_t getActualSize() const noexcept override; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
std::size_t getActualSize() const noexcept override; | |
/* | |
* \brief Returns the total size allocated in bytes. | |
*/ | |
std::size_t getActualSize() const noexcept override; |
std::size_t m_total_blocks{0}; | ||
std::size_t m_releasable_blocks{0}; | ||
std::size_t m_aligned_bytes{0}; | ||
std::size_t m_aligned_highwatermark{0}; | ||
std::size_t m_actual_bytes{0}; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
std::size_t m_total_blocks{0}; | |
std::size_t m_releasable_blocks{0}; | |
std::size_t m_aligned_bytes{0}; | |
std::size_t m_aligned_highwatermark{0}; | |
std::size_t m_actual_bytes{0}; | |
std::size_t m_total_blocks{0}; | |
std::size_t m_releasable_blocks{0}; | |
std::size_t m_aligned_bytes{0}; // Current size of the pool, rounded up to alignment | |
std::size_t m_aligned_highwatermark{0}; // Highwatermark of the aligned size | |
std::size_t m_actual_bytes{0}; // Total size allocated in bytes |
std::size_t m_actual_bytes{0}; | ||
std::size_t m_current_bytes{0}; | ||
std::size_t m_releasable_bytes{0}; | ||
std::size_t m_actual_highwatermark{0}; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
std::size_t m_actual_highwatermark{0}; | |
std::size_t m_actual_highwatermark{0}; // Highwatermark of the actual size |
d87e3d0
to
ebf769b
Compare
No description provided.