[Tarantool-patches] [PATCH] region: take allocated region size instead of used one
Georgy Kirichenko
georgy at tarantool.org
Mon Jan 27 23:26:02 MSK 2020
Sorry, I forgot an issue and a branch.
Issue: https://github.com/tarantool/tarantool/issues/4736
Branch: https://github.com/tarantool/tarantool/tree/g.kirichenko/gh-4736-region-size-for-gc
Also the branch was repushed because of wrong rebase.
On Monday, 27 January 2020 22:33:20 MSK Georgy Kirichenko wrote:
> 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;
> }
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 488 bytes
Desc: This is a digitally signed message part.
URL: <https://lists.tarantool.org/pipermail/tarantool-patches/attachments/20200127/d3ad0f39/attachment.sig>
More information about the Tarantool-patches
mailing list