Core/Packets: Reduce memory footprint of cached queries (#22297)

Ensure only the minimum required memory is used by caching query packets by calling shrink_to_fit()
This commit is contained in:
jackpoz
2018-08-22 19:44:21 +02:00
committed by GitHub
parent 6e8070ae33
commit deabd4ab45
6 changed files with 10 additions and 0 deletions

View File

@@ -413,6 +413,11 @@ class TC_SHARED_API ByteBuffer
_storage.reserve(ressize);
}
void shrink_to_fit()
{
_storage.shrink_to_fit();
}
void append(const char *src, size_t cnt)
{
return append((const uint8 *)src, cnt);