MCPcopy Create free account
hub / github.com/apache/arrow / TouchCacheLines

Function TouchCacheLines

cpp/src/arrow/memory_pool_benchmark.cc:53–61  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

51#endif
52
53static void TouchCacheLines(uint8_t* data, int64_t nbytes) {
54 uint8_t total = 0;
55 while (nbytes > 0) {
56 total += *data;
57 data += kCacheLineSize;
58 nbytes -= kCacheLineSize;
59 }
60 benchmark::DoNotOptimize(total);
61}
62
63// Benchmark the cost of accessing always the same memory area.
64// This gives us a lower bound of the potential difference between

Callers 2

TouchAreaFunction · 0.85
AllocateTouchDeallocateFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected