Tarantool development patches archive
 help / color / mirror / Atom feed
From: Vladimir Davydov <vdavydov.dev@gmail.com>
To: kostja@tarantool.org
Cc: tarantool-patches@freelists.org
Subject: [PATCH 5/8] memtx: destroy slab arena on engine shutdown
Date: Tue, 22 May 2018 14:46:13 +0300	[thread overview]
Message-ID: <084ce3c6f657e3fe0b64ca8d20ecac9632304ba0.1526987033.git.vdavydov.dev@gmail.com> (raw)
In-Reply-To: <cover.1526987033.git.vdavydov.dev@gmail.com>
In-Reply-To: <cover.1526987033.git.vdavydov.dev@gmail.com>

Since it is created when the memtx engine is initialized, we should
destroy it on engine shutdown.
---
 src/box/memtx_engine.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/src/box/memtx_engine.c b/src/box/memtx_engine.c
index b1a9b157..51a47eff 100644
--- a/src/box/memtx_engine.c
+++ b/src/box/memtx_engine.c
@@ -138,6 +138,11 @@ memtx_engine_shutdown(struct engine *engine)
 		mempool_destroy(&memtx->hash_iterator_pool);
 	if (mempool_is_initialized(&memtx->bitset_iterator_pool))
 		mempool_destroy(&memtx->bitset_iterator_pool);
+	mempool_destroy(&memtx->index_extent_pool);
+	slab_cache_destroy(&memtx->index_slab_cache);
+	small_alloc_destroy(&memtx->alloc);
+	slab_cache_destroy(&memtx->slab_cache);
+	tuple_arena_destroy(&memtx->arena);
 	xdir_destroy(&memtx->snap_dir);
 	free(memtx);
 }
-- 
2.11.0

  parent reply	other threads:[~2018-05-22 11:46 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-05-22 11:46 [PATCH 0/8] Follow-up on async memtx index cleanup Vladimir Davydov
2018-05-22 11:46 ` [PATCH 1/8] memtx: init index extent allocator in engine constructor Vladimir Davydov
2018-05-22 13:43   ` Konstantin Osipov
2018-05-22 11:46 ` [PATCH 2/8] memtx: fold memtx_tuple.cc into memtx_engine.c Vladimir Davydov
2018-05-22 13:45   ` Konstantin Osipov
2018-05-22 11:46 ` [PATCH 3/8] memtx: pass engine to memory allocation functions Vladimir Davydov
2018-05-22 13:47   ` Konstantin Osipov
2018-05-22 14:39     ` Vladimir Davydov
2018-05-22 11:46 ` [PATCH 4/8] memtx: move all global variables to engine Vladimir Davydov
2018-05-22 13:48   ` Konstantin Osipov
2018-05-22 11:46 ` Vladimir Davydov [this message]
2018-05-22 13:50   ` [PATCH 5/8] memtx: destroy slab arena on engine shutdown Konstantin Osipov
2018-05-22 16:26     ` Vladimir Davydov
2018-05-22 11:46 ` [PATCH 6/8] memtx: embed light hash into memtx_hash_index Vladimir Davydov
2018-05-22 13:51   ` Konstantin Osipov
2018-05-22 11:46 ` [PATCH 7/8] memtx: rework background garbage collection procedure Vladimir Davydov
2018-05-22 13:56   ` Konstantin Osipov
2018-05-22 14:49     ` Vladimir Davydov
2018-05-22 16:42       ` Konstantin Osipov
2018-05-22 11:46 ` [PATCH 8/8] memtx: run garbage collection on demand Vladimir Davydov
2018-05-22 14:00   ` Konstantin Osipov

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=084ce3c6f657e3fe0b64ca8d20ecac9632304ba0.1526987033.git.vdavydov.dev@gmail.com \
    --to=vdavydov.dev@gmail.com \
    --cc=kostja@tarantool.org \
    --cc=tarantool-patches@freelists.org \
    --subject='Re: [PATCH 5/8] memtx: destroy slab arena on engine shutdown' \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox