diff options
author | cee1 <fykcee1@gmail.com> | 2011-03-18 10:03:41 +0800 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2011-03-28 21:42:31 +0200 |
commit | 37f85e66e8f396b6f758e063531b95531aef628e (patch) | |
tree | 4c914f49c19d6712b76fc1be5f58929a2aa9d5bc /src/util.h | |
parent | f9276855a1d270b6c3f857cdaf2c4b49920c2228 (diff) |
util: detect page size runtime.
Some architectures support multiple machine types with diffenent
page sizes, and some machine types even support multiple
page sizes themselves.
Diffstat (limited to 'src/util.h')
-rw-r--r-- | src/util.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/util.h b/src/util.h index 192ebff1fa..04afc731e9 100644 --- a/src/util.h +++ b/src/util.h @@ -83,6 +83,9 @@ struct timespec *timespec_store(struct timespec *ts, usec_t u); usec_t timeval_load(const struct timeval *tv); struct timeval *timeval_store(struct timeval *tv, usec_t u); +size_t page_size(void); +#define PAGE_ALIGN(l) ALIGN_TO((l), page_size()) + #define streq(a,b) (strcmp((a),(b)) == 0) #define strneq(a, b, n) (strncmp((a), (b), (n)) == 0) |