Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/facebook/CacheLib
/ getPageBytes
Function
getPageBytes
cachelib/benchmarks/HashMapBenchmark.cpp:73–81 ·
view source on GitHub ↗
Source
from the content-addressed store, hash-verified
71
}
72
73
size_t getPageBytes() {
74
std::ifstream file(
"/proc/self/statm"
);
75
76
size_t pages;
77
file >> pages; // Ignore first
78
file >> pages;
79
80
return pages * getpagesize();
81
}
82
83
template <class Map>
84
Map makeMap(size_t& size) {
Callers
1
makeMap
Function · 0.85
Calls
no outgoing calls
Tested by
no test coverage detected