0
0
mirror of https://gitlab.nic.cz/labs/bird.git synced 2024-12-22 09:41:54 +00:00

Even on shutdown we should try to pass the freed memory to others

This commit is contained in:
Maria Matejka 2024-06-26 23:21:32 +02:00
parent af73cc4215
commit 18d069d663

View File

@ -268,7 +268,7 @@ free_page(void *ptr)
#ifdef HAVE_MMAP
/* We primarily try to keep the pages locally. */
struct free_page *fp = ptr;
if (shutting_down || (pages_kept_here < KEEP_PAGES_MAX_LOCAL))
if (pages_kept_here < KEEP_PAGES_MAX_LOCAL)
{
struct free_page *next = local_page_stack;
atomic_store_explicit(&fp->next, next, memory_order_relaxed);