From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from [87.239.111.99] (localhost [127.0.0.1]) by dev.tarantool.org (Postfix) with ESMTP id D2C1B6EC5B; Sat, 10 Apr 2021 17:59:39 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org D2C1B6EC5B DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=tarantool.org; s=dev; t=1618066779; bh=UPKy4jjcym2yN7SiWwRQsbbMBadwGoTNx4vxrmdFMps=; h=Date:To:References:In-Reply-To:Subject:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:Cc: From; b=U3awWzmG0NVI/m1LPzWpoiLcMYl2s0Cyn5wmilznkD/ur2WRc72OSN9BRuIKaQmrf am0DLBuJkxKKsydeKLG+E2cyoDuO2b6RpehlbX9kJ9chpM+ADLsga+50qsiN8ImaHR aRwuSqg2+RaYamrRM4Zfq7agxVzJuQt9m3YYdgTo= Received: from mail-lj1-f171.google.com (mail-lj1-f171.google.com [209.85.208.171]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by dev.tarantool.org (Postfix) with ESMTPS id 159A76EC5B for ; Sat, 10 Apr 2021 17:59:38 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org 159A76EC5B Received: by mail-lj1-f171.google.com with SMTP id u4so9890995ljo.6 for ; Sat, 10 Apr 2021 07:59:38 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=xFX9uZeHJobWBdfqpe8FeSw3wbypFDci3JVqSyL4K7E=; b=uCjARnsQTjooF6HjlVm4wLJkbkqqnHou+NtrdjXKi+9I2tqb5sZldBrzIotlKo9AF7 Jp11oOx/8dNVrSA5C1gjG+KuIRhljf5R4XN8qQbGnRXWfyxNSMZCiPe3bj/m5wXS9yU4 HYYczCDmXaLquM4kw1tQPnBWuByv4oT/dAkflgQNBK9rk5cGPDwogqy4+OVH/3tidPn8 GVMMBxzFs2QnP3ywkz/Nu/MQlQXGaFv+z4ZT19tJR/VELSFy/jm/+IYi71UK1TnOTCoc qcKCmwihysHLjJrNcZlMRPiGZFZtBprkUxZz/AOsgtnT8wXNyIw3ng3DR4ZtTb02+CQ3 lrNA== X-Gm-Message-State: AOAM530NjYRcd3rAFyigz01m4KB2zBOnRBgApgHesNXT7cmQCQOyfzkB FEXanicTKZYWg5MVQh4N8H9qBrciPPg= X-Google-Smtp-Source: ABdhPJx8lag1TRERUruMdZt5TnOCEF58iWXaUPQZFptuOw3M9KkgZnDGAQi4e7X1a3TZ3RTa1wFKrw== X-Received: by 2002:a2e:8616:: with SMTP id a22mr12397885lji.509.1618066776992; Sat, 10 Apr 2021 07:59:36 -0700 (PDT) Received: from grain.localdomain ([5.18.199.94]) by smtp.gmail.com with ESMTPSA id r18sm1094051lfm.297.2021.04.10.07.59.35 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 10 Apr 2021 07:59:35 -0700 (PDT) Received: by grain.localdomain (Postfix, from userid 1000) id E251F5601CD; Sat, 10 Apr 2021 17:59:34 +0300 (MSK) Date: Sat, 10 Apr 2021 17:59:34 +0300 To: Vladislav Shpilevoy Message-ID: References: <20210408164151.1759348-1-gorcunov@gmail.com> <20210408164151.1759348-4-gorcunov@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/2.0.5 (2021-01-21) Subject: Re: [Tarantool-patches] [PATCH v21 3/6] box/module_cache: introduce modules subsystem X-BeenThere: tarantool-patches@dev.tarantool.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Tarantool development patches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , From: Cyrill Gorcunov via Tarantool-patches Reply-To: Cyrill Gorcunov Cc: tml Errors-To: tarantool-patches-bounces@dev.tarantool.org Sender: "Tarantool-patches" On Sat, Apr 10, 2021 at 01:54:43AM +0200, Vladislav Shpilevoy wrote: > > +void > > +module_free(void) > > +{ > > + while (mh_size(module_cache) > 0) { > > + mh_int_t e = mh_first(module_cache); > > + mh_strnptr_del(module_cache, e, NULL); > > Is this loop really needed? It seems the mhash delete() > frees all the memory anyway. Thanks, Vlad! Ineed this is not needed. I force-pushed an update.