blob: fd582c0e78fcbf2a2a1496bf2726a26f87a85376 [file] [log] [blame]
/* SPDX-License-Identifier: LGPL-2.1-or-later */
#include <stdbool.h>
#include "env-util.h"
#include "mempool.h"
#include "process-util.h"
bool mempool_enabled(void) {
static int cache = -1;
if (!is_main_thread())
return false;
if (cache < 0)
cache = getenv_bool("SYSTEMD_MEMPOOL") != 0;
return cache;
}