From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from smtp47.i.mail.ru (smtp47.i.mail.ru [94.100.177.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dev.tarantool.org (Postfix) with ESMTPS id B42FF46970E for ; Mon, 27 Jan 2020 22:33:23 +0300 (MSK) From: Georgy Kirichenko Date: Mon, 27 Jan 2020 22:33:20 +0300 Message-Id: <20200127193320.33773-1-georgy@tarantool.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [Tarantool-patches] [PATCH] region: take allocated region size instead of used one List-Id: Tarantool development patches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: tarantool-patches@dev.tarantool.org As region has cached but not used slabs take the full region size in account while fiber gc. Fixes #4736 diff --git a/src/lib/core/fiber.c b/src/lib/core/fiber.c index 00ae8cded..f795dc566 100644 --- a/src/lib/core/fiber.c +++ b/src/lib/core/fiber.c @@ -774,7 +774,7 @@ fiber_self() void fiber_gc(void) { - if (region_used(&fiber()->gc) < 128 * 1024) { + if (region_total(&fiber()->gc) < 128 * 1024) { region_reset(&fiber()->gc); return; } -- 2.25.0