diff options
Diffstat (limited to 'lib/common.h')
-rw-r--r-- | lib/common.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/lib/common.h b/lib/common.h index c53a69e..1b1ee65 100644 --- a/lib/common.h +++ b/lib/common.h @@ -93,6 +93,13 @@ _get_bitmap_size(size_t size, size_t pgsize) return ROUND_UP(nr_pages, sizeof(uint64_t) * CHAR_BIT) / CHAR_BIT; } +/* + * The size, in bytes, of the bitmap that represents the given range with the + * given page size. + * + * Returns -1 and sets errno if the given page size is invalid for the given + * range. + */ static inline ssize_t get_bitmap_size(size_t region_size, size_t pgsize) { |