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
The vfree
function (and every sane deallocation function in general) does not care about your actual data (be it volatile
or not). It just expects a (valid) pointer (think: passing the pointer as a long
value in a CPU register).
Based on that value, the function will:
So yes, casting to a void *
will not cause any harm at runtime.