proxygen
MemoryIdlerBenchmark.cpp File Reference

Go to the source code of this file.

Functions

 BENCHMARK (releaseStack, iters)
 
 BENCHMARK (releaseMallocTLS, iters)
 
int main (int argc, char **argv)
 

Function Documentation

BENCHMARK ( releaseStack  ,
iters   
)

Definition at line 23 of file MemoryIdlerBenchmark.cpp.

References i, and folly::detail::MemoryIdler::unmapUnusedStack().

23  {
24  for (size_t i = 0; i < iters; ++i) {
25  MemoryIdler::unmapUnusedStack();
26  }
27 }
BENCHMARK ( releaseMallocTLS  ,
iters   
)

Definition at line 29 of file MemoryIdlerBenchmark.cpp.

References folly::detail::MemoryIdler::flushLocalMallocCaches(), and i.

29  {
30  for (size_t i = 0; i < iters; ++i) {
31  MemoryIdler::flushLocalMallocCaches();
32  }
33 }
int main ( int  argc,
char **  argv 
)

Definition at line 35 of file MemoryIdlerBenchmark.cpp.

References folly::runBenchmarks().

35  {
36  gflags::ParseCommandLineFlags(&argc, &argv, true);
38  return 0;
39 }
void runBenchmarks()
Definition: Benchmark.cpp:456
char ** argv