admin管理员组文章数量:1131217
I'm writing a microbenchmark to generate traffic to main memory (DRAM) using c++ and g++. I know I can inline assembly to create uncacheable accesses. However, I want this to operate on multiple systems (x86, ARM, RISC-V) and was wondering if g++ has the ability to mark a memory buffer as uncacheable?
I looked at malloc's documentation and it doesn't seem to let me pass any flags that mark a region as uncacheable (or, barring that, non-temporal).
I know the page tables in ARM at least allow a page that's allocated to have cacheability attributes. Does g++ have a way to portably try to make a memory region bypass cache?
本文标签: gccIn C is there a portable way to make uncacheable memory accessesStack Overflow
版权声明:本文标题:gcc - In C++ is there a portable way to make uncacheable memory accesses? - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1736767796a1951916.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论