]> git.proxmox.com Git - ceph.git/blob - ceph/src/common/page.cc
add subtree-ish sources for 12.0.3
[ceph.git] / ceph / src / common / page.cc
1 #include <unistd.h>
2
3 namespace ceph {
4
5 // page size crap, see page.h
6 int _get_bits_of(int v) {
7 int n = 0;
8 while (v) {
9 n++;
10 v = v >> 1;
11 }
12 return n;
13 }
14
15 unsigned _page_size = sysconf(_SC_PAGESIZE);
16 unsigned long _page_mask = ~(unsigned long)(_page_size - 1);
17 unsigned _page_shift = _get_bits_of(_page_size - 1);
18
19 }