[Tarantool-patches] [PATCH] region: take allocated region size instead of used one

Georgy Kirichenko georgy at tarantool.org
Mon Jan 27 22:33:20 MSK 2020


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



More information about the Tarantool-patches mailing list