blob: afa0f211a1689437e209634d358f130b71052bf5 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
|
/*
* Copyright (C) 2025 dwlr <dweller@cabin.digital>
*
* BSD 3-Clause License (BSD-3-Clause)
* See LICENSE for details
*/
ssize cpu_count(void)
{
static ssize cpus = 0;
if(!cpus) cpus = sysconf(_SC_NPROCESSORS_ONLN);
return cpus;
}
ssize mm_pagesize(void)
{
static ssize page_size = 0;
if(!page_size) page_size = sysconf(_SC_PAGE_SIZE);
return page_size;
}
|