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

Function TouchCacheLines

cpp/src/arrow/memory_pool_benchmark.cc:52–60  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

50#endif
51
52static void TouchCacheLines(uint8_t* data, int64_t nbytes) {
53 uint8_t total = 0;
54 while (nbytes > 0) {
55 total += *data;
56 data += kCacheLineSize;
57 nbytes -= kCacheLineSize;
58 }
59 benchmark::DoNotOptimize(total);
60}
61
62// Benchmark the cost of accessing always the same memory area.
63// 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