Code Review
/
stor4nfv.git
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
review
|
tree
history
|
raw
|
HEAD
initial code repo
[stor4nfv.git]
/
src
/
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
}