c++ - Can i check if a chunk of memory (e.g., allocated using malloc) stays in the cache? -


assume allocate space using malloc. can check whether continuous memory remains within cpu's cache (or better within cache levels l1, l2, l3 etc.) in run-time ?

determining content of cpu cache low level , beyond c can do. in fact, caching transparent code may writing cpu pretty decides cache , cannot afford waste timein convoluted logic on how so. quick googling on specific tools effect came intel tuning guide , performance analysis papers: https://software.intel.com/en-us/articles/processor-specific-performance-analysis-papers. obviously, vendor specific. amd have specific tools.


Comments

Popular posts from this blog

c++ - llvm function pass ReplaceInstWithInst malloc -

java.lang.NoClassDefFoundError When Creating New Android Project -

Decoding a Python 2 `tempfile` with python-future -