Skip to content

Commit 0556589

Browse files
committedMar 6, 2025
first implementation.
1 parent 1915703 commit 0556589

File tree

2 files changed

+19
-0
lines changed

2 files changed

+19
-0
lines changed
 

‎pagesize.c

+10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
#ifndef __AIL_PAGESIZE_H__
2+
#define __AIL_PAGESIZE_H__ 1
3+
4+
#include <unistd.h>
5+
6+
size_t page_size(void) {
7+
return sysconf(_SC_PAGESIZE);
8+
}
9+
10+
#endif // __AIL_PAGESIZE_H__

‎pagesize.h

+9
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
#ifndef __AIL_PAGESIZE_H__
2+
#define __AIL_PAGESIZE_H__ 1
3+
4+
#include <ctype.h>
5+
6+
// Page size seems to be portable on linux and macos.
7+
size_t page_size(void);
8+
9+
#endif // __AIL_PAGESIZE_H__

0 commit comments

Comments
 (0)
Please sign in to comment.