Fix ObReserveArenaAllocator reuse() and reset(). And reuse rows_info.scan_mem_allocator at the end of exist.

This commit is contained in:
obdev
2022-11-15 08:36:44 +00:00
committed by wangzelin.wzl
parent 0b9d1f8cd0
commit 5dd12c9171
7 changed files with 163 additions and 5 deletions

View File

@ -80,7 +80,7 @@ public:
}
virtual void reset() override
{
if (pos_ > MAX_RESERVE_SIZE - 1) {
if (allocator_.used() > 0) {
allocator_.reset();
}
pos_ = 0;
@ -88,7 +88,7 @@ public:
}
virtual void reuse() override
{
if (pos_ > MAX_RESERVE_SIZE - 1) {
if (allocator_.used() > 0) {
allocator_.reuse();
}
pos_ = 0;