From a8c5ed34ede13dbd5a3d51d6f43c686b9e68540b Mon Sep 17 00:00:00 2001 From: tianfenghan Date: Tue, 15 Mar 2022 14:35:14 +0800 Subject: [PATCH] Add assertion --- src/memory/fixed_pool.cc | 1 + 1 file changed, 1 insertion(+) diff --git a/src/memory/fixed_pool.cc b/src/memory/fixed_pool.cc index 3981b8108d7..74171ddee1b 100644 --- a/src/memory/fixed_pool.cc +++ b/src/memory/fixed_pool.cc @@ -150,6 +150,7 @@ void *FixedPool::alloc(uint32_t size) { FixedPoolSlice *slice = impl->head; if (slice->lock) { swoole_set_last_error(SW_ERROR_MALLOC_FAIL); + assert(get_number_of_spare_slice() == 0); return nullptr; }