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 076FF6E78C5; Mon, 20 Nov 2023 17:57:28 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org 076FF6E78C5 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=tarantool.org; s=dev; t=1700492248; bh=kvlgy/4XVyqu72HhO1eBaRE1Ihz6UD35wMR4x5ERPmQ=; 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=Ky0KAq7V2WWLXVyoslrae8fJX0ED0g4h2mIDGBV4XiRiknZ+PPafQ3H4UNw7T/Abr ddQqJ9DAsJdJal7hhx86GRy8A8KE3sxiO1eCZa0sAJ5xrTPRsi6T/199T9f7n/mKP2 XvpI6xNu1se0u3uS0CqehiSJBKM1J8urlwwNZO38= Received: from smtp54.i.mail.ru (smtp54.i.mail.ru [95.163.41.89]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 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 A88246E7427 for ; Mon, 20 Nov 2023 17:57:25 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org A88246E7427 Received: by smtp54.i.mail.ru with esmtpa (envelope-from ) id 1r55iF-005kmi-0n; Mon, 20 Nov 2023 17:57:23 +0300 Date: Mon, 20 Nov 2023 14:53:22 +0000 To: Sergey Bronnikov Message-ID: References: <20231109134549.4905-1-max.kokryashkin@gmail.com> <1e374d3c-ad4a-4379-a22b-85cbc083f658@tarantool.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <1e374d3c-ad4a-4379-a22b-85cbc083f658@tarantool.org> X-Clacks-Overhead: GNU Terry Pratchett X-Mailru-Src: smtp X-4EC0790: 10 X-7564579A: EEAE043A70213CC8 X-77F55803: 4F1203BC0FB41BD93F1575C7510F55475E315F415624ABB7C25A6AFC357EBC4400894C459B0CD1B9A61020F6875E6BE608B06FC91CA149FDC6D6C9B7CE111B81B6BD4AB1FA1FD4A3 X-7FA49CB5: FF5795518A3D127A4AD6D5ED66289B5278DA827A17800CE75840EB8CDBC1001FEA1F7E6F0F101C67BD4B6F7A4D31EC0BCC500DACC3FED6E28638F802B75D45FF8AA50765F7900637889C00975665ABF68638F802B75D45FF36EB9D2243A4F8B5A6FCA7DBDB1FC311F39EFFDF887939037866D6147AF826D8128FC3A57705EB759D2CBA605F341D7E117882F4460429724CE54428C33FAD305F5C1EE8F4F765FC2EE5AD8F952D28FBA471835C12D1D9774AD6D5ED66289B52BA9C0B312567BB23117882F446042972877693876707352033AC447995A7AD18F04B652EEC242312D2E47CDBA5A96583BA9C0B312567BB2376E601842F6C81A19E625A9149C048EEB28585415E75ADA9CEDA8D6C8C3B0531D8FC6C240DEA76429C9F4D5AE37F343AA9539A8B242431040A6AB1C7CE11FEE367F1C1C3ABB44F3A6E0066C2D8992A16C4224003CC836476E2F48590F00D11D6E2021AF6380DFAD1A18204E546F3947CB861051D4BA689FC2E808ACE2090B5E1725E5C173C3A84C3C5EA940A35A165FF2DBA43225CD8A89FB26E97DCB74E6252156CCFE7AF13BCA4B5C8C57E37DE458BEDA766A37F9254B7 X-C1DE0DAB: 0D63561A33F958A5F95E133E2C2B95F0277195484A7FAE6A98FCFA58A203BB58F87CCE6106E1FC07E67D4AC08A07B9B0251EFD5447B32ED6CB5012B2E24CD356 X-C8649E89: 1C3962B70DF3F0ADBF74143AD284FC7177DD89D51EBB7742424CF958EAFF5D571004E42C50DC4CA955A7F0CF078B5EC49A30900B95165D348B532EA2091F4FF6D4633802ED8D88F6F3ED9D143F17DD3FE346AB9EEC4C923278688FE2FDCEC66F1D7E09C32AA3244CCB0E668FB4C0B6063D87996129CA2E624DBEAD0ED6C55A80ED9A463B7D0AAFF65DA084F8E80FEBD376A4ED3E9341DC2FCD72808BE417F3B9E0E7457915DAA85F X-D57D3AED: 3ZO7eAau8CL7WIMRKs4sN3D3tLDjz0dLbV79QFUyzQ2Ujvy7cMT6pYYqY16iZVKkSc3dCLJ7zSJH7+u4VD18S7Vl4ZUrpaVfd2+vE6kuoey4m4VkSEu530nj6fImhcD4MUrOEAnl0W826KZ9Q+tr5ycPtXkTV4k65bRjmOUUP8cvGozZ33TWg5HZplvhhXbhDGzqmQDTd6OAevLeAnq3Ra9uf7zvY2zzsIhlcp/Y7m53TZgf2aB4JOg4gkr2biojmRIjd71J0y3csdSCGbPpVQ== X-Mailru-Sender: 2FEBA92C8E508479FE7B9A1DF348D5313943555FB059669F73E7D500804919F7FC32C2461F02196F2326FE6F2A341ACE0FB9F97486540B4CD9E8847AB8CFED4D9ABF8A61C016C2CFB0DAF586E7D11B3E67EA787935ED9F1B X-Mras: Ok Subject: Re: [Tarantool-patches] [PATCH luajit v2] test: fix flaky OOM error frame test 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: Igor Munkin via Tarantool-patches Reply-To: Igor Munkin Cc: Maksim Kokryashkin , tarantool-patches@dev.tarantool.org Errors-To: tarantool-patches-bounces@dev.tarantool.org Sender: "Tarantool-patches" Sergey, On 18.11.23, Sergey Bronnikov via Tarantool-patches wrote: > Hello, Max > > LGTM with a question below > > > On 11/9/23 16:45, Maksim Kokryashkin wrote: > > > > +collectgarbage() > > Probably it is obvious, but I don't get it. > > Usually for forcing garbage collecting one need call `collectgarbage()` two > times: > > for mark and sweep. You call it single time, why? The reason of two consequent calls is not for "mark and sweep" but rather for "full GC cycle + finalization of the resurrected objects". The first call implements full (even 1.5) GC cycle; as a result of this call some *objects* can be *released*, but the corresponding *memory* is preserved in another list (gc->mmudata, IIRC) to properly finalize the object (i.e. call __gc metamethod). Hence, the second call finally releases the memory for the objects resurrected within the sweep phase of the first call. Since Max allocates plain FFI objects with no finalizers, there is no need in the second call here. > > > -- Best regards, IM