From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Date: Tue, 22 May 2018 16:47:28 +0300 From: Konstantin Osipov Subject: Re: [PATCH 3/8] memtx: pass engine to memory allocation functions Message-ID: <20180522134728.GC11201@atlas> References: <9723814bc47225881dabb75f4ebb72aab59f1724.1526987033.git.vdavydov.dev@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <9723814bc47225881dabb75f4ebb72aab59f1724.1526987033.git.vdavydov.dev@gmail.com> To: Vladimir Davydov Cc: tarantool-patches@freelists.org List-ID: * Vladimir Davydov [18/05/22 15:10]: > We need this so that we can force garbage collection when we are short > on memory. There are two such functions: one is used for allocating > index extents, another for allocating tuples. Index allocating function > has an opaque context so we simply reuse it for passing memtx engine to > it. To pass memtx engine to tuple allocating function, we add an opaque > engine specific pointer to tuple_format (engine_data) and set it to > memtx_engine for memtx spaces. Please rename engine_data to engine. I would not use an opaque pointer either, reference the engine explicitly. Otherwise OK to push. -- Konstantin Osipov, Moscow, Russia, +7 903 626 22 32 http://tarantool.io - www.twitter.com/kostja_osipov