]> git.ipfire.org Git - thirdparty/systemd.git/blame - src/shared/enable-mempool.c
core/service: remove unnecessary reset of notify_access_override
[thirdparty/systemd.git] / src / shared / enable-mempool.c
CommitLineData
db9ecf05 1/* SPDX-License-Identifier: LGPL-2.1-or-later */
a5d8835c 2
b01f3195
ZJS
3#include <stdbool.h>
4
5#include "env-util.h"
a5d8835c 6#include "mempool.h"
b01f3195
ZJS
7#include "process-util.h"
8
9bool mempool_enabled(void) {
10 static int cache = -1;
11
12 if (!is_main_thread())
13 return false;
14
15 if (cache < 0)
16 cache = getenv_bool("SYSTEMD_MEMPOOL") != 0;
a5d8835c 17
b01f3195
ZJS
18 return cache;
19}