mirror of
https://github.com/morgan9e/systemd
synced 2026-04-14 08:25:20 +09:00
18 lines
352 B
C
18 lines
352 B
C
/* SPDX-License-Identifier: LGPL-2.1-or-later */
|
|
|
|
#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;
|
|
}
|