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 C01506F839F; Wed, 22 Nov 2023 18:28:57 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org C01506F839F DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=tarantool.org; s=dev; t=1700666937; bh=ZZPSXm+hErw/AhE9plGzUiyrdimUIZpJvtWLo4EZ7h4=; 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=b1Lh748N0BcHRKedmLyfpitxP/O4ae5I5doMF83fv8Dy408+hdCBh/dtXtDcBJqZY 6x+V4E4R2jz53n/NDI+EYzC8fI5Alpw2Z5DACN38qBP4uq5D9MEusE7yMicjpILqam mBSXpjiRUazrpf8ybDAb3KauYXcW27gKQlGAMfxA= Received: from smtp61.i.mail.ru (smtp61.i.mail.ru [95.163.41.99]) (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 765F86F8050 for ; Wed, 22 Nov 2023 18:28:56 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org 765F86F8050 Received: by smtp61.i.mail.ru with esmtpa (envelope-from ) id 1r5p9r-000VZl-0M; Wed, 22 Nov 2023 18:28:55 +0300 Message-ID: Date: Wed, 22 Nov 2023 18:28:54 +0300 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Content-Language: en-US To: Igor Munkin References: <20231109134549.4905-1-max.kokryashkin@gmail.com> <1e374d3c-ad4a-4379-a22b-85cbc083f658@tarantool.org> In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Mailru-Src: smtp X-4EC0790: 10 X-7564579A: B8F34718100C35BD X-77F55803: 4F1203BC0FB41BD92D71B79D2A671AE668E785BEFADD65DB039C53F8CE87BD29182A05F538085040ABA135E321559F22A6438F29EACCD3B650B6219B5B49DEAEAF9A7C6481200CB7 X-7FA49CB5: FF5795518A3D127A4AD6D5ED66289B5278DA827A17800CE7A352E4F59960F77CEA1F7E6F0F101C67BD4B6F7A4D31EC0BCC500DACC3FED6E28638F802B75D45FF8AA50765F79006378D08D652E28591A78638F802B75D45FF36EB9D2243A4F8B5A6FCA7DBDB1FC311F39EFFDF887939037866D6147AF826D8AF1E199D9F2409A4D66CFD427FB6F00D117882F4460429724CE54428C33FAD305F5C1EE8F4F765FC974A882099E279BDA471835C12D1D9774AD6D5ED66289B52BA9C0B312567BB23117882F446042972877693876707352033AC447995A7AD18E5D25F19253116ADD2E47CDBA5A96583BA9C0B312567BB2376E601842F6C81A19E625A9149C048EE9647ADFADE5905B1BDB03A3F2A65D472D8FC6C240DEA76429C9F4D5AE37F343AA9539A8B242431040A6AB1C7CE11FEE34E7D9683544204AF03F1AB874ED89028C4224003CC836476E2F48590F00D11D6E2021AF6380DFAD1A18204E546F3947CD2DCF9CF1F528DBC2E808ACE2090B5E1725E5C173C3A84C3C5EA940A35A165FF2DBA43225CD8A89F0A35B161A8BF67C157739F23D657EF2BB5C8C57E37DE458BEDA766A37F9254B7 X-C1DE0DAB: 0D63561A33F958A50336FC293B260266C1E8A3A50B996F56EAF0B08A1BD6E2FEF87CCE6106E1FC07E67D4AC08A07B9B0251EFD5447B32ED6CB5012B2E24CD356 X-C8649E89: 1C3962B70DF3F0ADBF74143AD284FC7177DD89D51EBB7742424CF958EAFF5D571004E42C50DC4CA955A7F0CF078B5EC49A30900B95165D34B9F55CA4D2956E30B975B5630910DFA3B48E3EE89DF2BA5951E7CC7DC51BF1CDB4848B6758C60F2B1D7E09C32AA3244CEFD4E269F705C7A7D2FF3F5FBFBBFD73853296C06374E602ED9A463B7D0AAFF65DA084F8E80FEBD3FFA33E6B6B2F82C47A83BD0C44CE203720ABEDE4BBDD9CDD X-D57D3AED: 3ZO7eAau8CL7WIMRKs4sN3D3tLDjz0dLbV79QFUyzQ2Ujvy7cMT6pYYqY16iZVKkSc3dCLJ7zSJH7+u4VD18S7Vl4ZUrpaVfd2+vE6kuoey4m4VkSEu530nj6fImhcD4MUrOEAnl0W826KZ9Q+tr5ycPtXkTV4k65bRjmOUUP8cvGozZ33TWg5HZplvhhXbhDGzqmQDTd6OAevLeAnq3Ra9uf7zvY2zzsIhlcp/Y7m53TZgf2aB4JOg4gkr2biojGZhPsaRkbbnWkiyTX4CBvA== X-Mailru-Sender: 11C2EC085EDE56FAC07928AF2646A76979E8353462305126A6438F29EACCD3B6009DB4CE3002C7DBEBA65886582A37BD66FEC6BF5C9C28D98A98C1125256619760D574B6FC815AB872D6B4FCE48DF648AE208404248635DF 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: Sergey Bronnikov via Tarantool-patches Reply-To: Sergey Bronnikov Cc: Maksim Kokryashkin , tarantool-patches@dev.tarantool.org Errors-To: tarantool-patches-bounces@dev.tarantool.org Sender: "Tarantool-patches" Igor, thanks for explanation! On 11/20/23 17:53, Igor Munkin wrote: > 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. > > >