diff options
Diffstat (limited to 'src/google/protobuf/arena.cc')
-rw-r--r-- | src/google/protobuf/arena.cc | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/google/protobuf/arena.cc b/src/google/protobuf/arena.cc index 59863986..17b095aa 100644 --- a/src/google/protobuf/arena.cc +++ b/src/google/protobuf/arena.cc @@ -138,7 +138,7 @@ void* Arena::AllocateAligned(size_t n) { // for this thread. if (!owns_first_block_ && b->next == NULL) { MutexLock l(&blocks_lock_); - if (b->owner == &b->owner) { + if (b->owner == &b->owner && b->avail() >= n) { b->owner = me; SetThreadCacheBlock(b); return AllocFromBlock(b, n); |