Freeing (vfree-ing) pointer to volatile data

前端 未结 2 1437
-上瘾入骨i
-上瘾入骨i 2021-01-25 00:44

volatile seems to be a never ending question of every one. I thought I knew everything about it, but then I encountered this:

So, I have a piece of memory s

2条回答
  •  孤独总比滥情好
    2021-01-25 01:30

    My conclusion was that just casting the pointer to void * would not cause a problem and the fact that free and vfree don't directly accept pointers to volatile data is just something that was overlooked.

提交回复
热议问题