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 B18A06EC5B; Sat, 10 Apr 2021 02:54:45 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org B18A06EC5B DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=tarantool.org; s=dev; t=1618012485; bh=3CTkXgu+KB5Hp1hzDEjV9c8qj/856Cq2SXGglD2g91k=; h=To:References:Date:In-Reply-To:Subject:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To: From; b=zGmq/qUgGjcQ/ggWODGjDwc2GLTm/rzmx228NqRt2XIIxGe/09IlkJh083KkFQvuV iXa09+JIqsGnYNJv7P1d44+j2TifSXGG+2vEkr3fIZLfndWOEW0jUYYtG2KHtaqDXo UE/qDPXJ7tWK+g/067sbEK3VORRLDDDwlg0uNyNE= Received: from smtpng3.m.smailru.net (smtpng3.m.smailru.net [94.100.177.149]) (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 5283A6EC5B for ; Sat, 10 Apr 2021 02:54:45 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org 5283A6EC5B Received: by smtpng3.m.smailru.net with esmtpa (envelope-from ) id 1lV0xY-0002jm-7X; Sat, 10 Apr 2021 02:54:44 +0300 To: Cyrill Gorcunov , tml References: <20210408164151.1759348-1-gorcunov@gmail.com> <20210408164151.1759348-4-gorcunov@gmail.com> Message-ID: Date: Sat, 10 Apr 2021 01:54:43 +0200 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:78.0) Gecko/20100101 Thunderbird/78.9.1 MIME-Version: 1.0 In-Reply-To: <20210408164151.1759348-4-gorcunov@gmail.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit X-7564579A: B8F34718100C35BD X-77F55803: 4F1203BC0FB41BD92FFCB8E6708E7480B1C8842CE613979772AC4B34408C6525182A05F53808504076D26E60F18371443D2615559EAC2EE541C6FE836B51644974ACEA981D255332 X-7FA49CB5: FF5795518A3D127A4AD6D5ED66289B5278DA827A17800CE7F2393C4755A27B53EA1F7E6F0F101C67BD4B6F7A4D31EC0BCC500DACC3FED6E28638F802B75D45FF8AA50765F7900637F5B2F26146BDF5648638F802B75D45FF914D58D5BE9E6BC1A93B80C6DEB9DEE97C6FB206A91F05B2C6086B0A1524BD680A68E27EA9A3B69644A6ACC89FD899E7D2E47CDBA5A96583C09775C1D3CA48CF4C82C86BFC697D19117882F4460429724CE54428C33FAD30A8DF7F3B2552694AC26CFBAC0749D213D2E47CDBA5A9658378DA827A17800CE7E4CD18687D5AE3809FA2833FD35BB23DF004C906525384302BEBFE083D3B9BA73A03B725D353964B0B7D0EA88DDEDAC722CA9DD8327EE4930A3850AC1BE2E7352F65BD3C784FEF8FC4224003CC83647689D4C264860C145E X-C1DE0DAB: 0D63561A33F958A50A918AE134A4F27362E84DD830CB459ADC3CCD1AD130EBE3D59269BC5F550898D99A6476B3ADF6B47008B74DF8BB9EF7333BD3B22AA88B938A852937E12ACA7502E6951B79FF9A3F410CA545F18667F91A7EA1CDA0B5A7A0 X-C8649E89: 4E36BF7865823D7055A7F0CF078B5EC49A30900B95165D3488E5CD2E691F5566B09C0BD1AC0B5BFC718646682E13CF4D9F6A624562B0A979E8EA8FFB78C8E4C91D7E09C32AA3244C69366CCC94084F35018113A67BB57B8B30452B15D76AEC14927AC6DF5659F194 X-D57D3AED: 3ZO7eAau8CL7WIMRKs4sN3D3tLDjz0dLbV79QFUyzQ2Ujvy7cMT6pYYqY16iZVKkSc3dCLJ7zSJH7+u4VD18S7Vl4ZUrpaVfd2+vE6kuoey4m4VkSEu530nj6fImhcD4MUrOEAnl0W826KZ9Q+tr5ycPtXkTV4k65bRjmOUUP8cvGozZ33TWg5HZplvhhXbhDGzqmQDTd6OAevLeAnq3Ra9uf7zvY2zzsIhlcp/Y7m53TZgf2aB4JOg4gkr2biojqcJA+pXcDumef498FMZT9g== X-Mailru-Sender: 689FA8AB762F73936BC43F508A0638223FABC9CA7B9D032125BFE28D150124703841015FED1DE5223CC9A89AB576DD93FB559BB5D741EB963CF37A108A312F5C27E8A8C3839CE0E267EA787935ED9F1B X-Mras: Ok 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: Vladislav Shpilevoy via Tarantool-patches Reply-To: Vladislav Shpilevoy Errors-To: tarantool-patches-bounces@dev.tarantool.org Sender: "Tarantool-patches" I appreciate the work you did here! The patch looks good. Only one question below. > diff --git a/src/box/module_cache.c b/src/box/module_cache.c > new file mode 100644 > index 000000000..3dcb40566 > --- /dev/null > +++ b/src/box/module_cache.c > @@ -0,0 +1,491 @@ <...> > + > +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. > + } > + mh_strnptr_delete(module_cache); > + module_cache = NULL; > +}