File tree Expand file tree Collapse file tree 1 file changed +10
-0
lines changed Expand file tree Collapse file tree 1 file changed +10
-0
lines changed Original file line number Diff line number Diff line change 15
15
#include <stdlib.h>
16
16
#include <string.h>
17
17
18
+ #ifndef _WIN32
19
+ #include <sys/syscall.h>
20
+ #include <unistd.h>
21
+ #endif
22
+
18
23
#ifdef __cplusplus
19
24
extern "C" {
20
25
#endif
@@ -44,6 +49,9 @@ static inline char *util_getenv(const char *name) {
44
49
45
50
static inline void util_free_getenv (char * val ) { free (val ); }
46
51
52
+ // TODO: implement util_get_page_size() for Windows
53
+ static inline size_t util_get_page_size (void ) { return 4096 ; }
54
+
47
55
#else /* Linux */
48
56
49
57
#define __TLS __thread
@@ -53,6 +61,8 @@ static inline void util_free_getenv(const char *val) {
53
61
(void )val ; // unused
54
62
}
55
63
64
+ static inline size_t util_get_page_size (void ) { return sysconf (_SC_PAGE_SIZE ); }
65
+
56
66
#endif /* _WIN32 */
57
67
58
68
// check if we are running in the proxy library
You can’t perform that action at this time.
0 commit comments