1
0
mirror of https://github.com/mariadb-corporation/mariadb-columnstore-engine.git synced 2025-07-30 19:23:07 +03:00

Forgot another small thing. I'm a dummy.

This commit is contained in:
Patrick LeBlanc
2019-01-22 10:17:18 -06:00
parent 259060fb29
commit 2e5d6db0c7
2 changed files with 14 additions and 2 deletions

View File

@ -381,6 +381,11 @@ public:
*/
inline void rewind();
/**
* Get the allocated size of the buffer.
*/
inline uint32_t getBufferSize() const;
/**
* Serializeable interface
*/
@ -390,7 +395,7 @@ public:
* Serializeable interface
*/
EXPORT void deserialize(ByteStream& bs);
/**
* memory allocation chunk size
*/
@ -529,6 +534,11 @@ inline ByteStream& ByteStream::operator=(const SBS& rhs)
return *this;
}
inline uint32_t ByteStream::getBufferSize() const
{
return fMaxLen;
}
/**
* stream a ByteStream out to any ostream
*/

View File

@ -73,8 +73,10 @@ void ByteStreamPool::returnByteStream(ByteStream *bs)
boost::mutex::scoped_lock s(mutex);
if (freeByteStream.size() > maxFreeBuffers)
delete bs;
else
else {
bs->restart();
freeByteStreams.push_back(bs);
}
}
}