Consolidate code for getting platform details into one place (#311)

Consolidate code for getting platform details into a single place
This commit is contained in:
Ryan Mast
2024-12-09 15:21:50 -08:00
committed by GitHub
parent a8bd7ac723
commit d70e3326da
5 changed files with 85 additions and 43 deletions
+16
View File
@@ -0,0 +1,16 @@
#ifndef PLATFORM_HPP
#define PLATFORM_HPP
#include <cstddef>
long get_num_avail_cpus();
long get_page_size();
size_t calc_memsize();
size_t get_max_open_files();
constexpr const char *get_null_device() { return "/dev/null"; }
#endif // PLATFORM_HPP