Skip to content
Snippets Groups Projects
Commit 0426cc7b authored by Vladimir Davydov's avatar Vladimir Davydov Committed by Vladimir Davydov
Browse files

vinyl: purge cache at exit for ASAN

Required to suppress the ASAN leak detector.

Closes #9158

NO_DOC=ASAN
NO_TEST=ASAN
NO_CHANGELOG=ASAN

(cherry picked from commit bf62170f)
parent 23dd75fa
No related branches found
No related tags found
No related merge requests found
......@@ -62,9 +62,18 @@ vy_cache_env_create(struct vy_cache_env *e, struct slab_cache *slab_cache)
sizeof(struct vy_cache_node));
}
/** Delete a node from the cache. */
static void
vy_cache_gc_step(struct vy_cache_env *env);
void
vy_cache_env_destroy(struct vy_cache_env *e)
{
#if ENABLE_ASAN
/* Purge cache to suppress leak detector. */
while (e->mem_used > 0)
vy_cache_gc_step(e);
#endif
mempool_destroy(&e->cache_node_mempool);
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment