Is there a way to force a variable to be stored in the cache in C?

前端 未结 5 818
误落风尘
误落风尘 2021-02-05 23:55

I just had a phone interview where I was asked this question. I am aware of ways to store in register or heap or stack, but cache specifically?

5条回答
  •  既然无缘
    2021-02-06 00:40

    In C, as in as defined by the C standard? No.

    In C, as in some specific implementation on a specific platform? Maybe.

提交回复
热议问题