What is the cost of sizeof?
I would expect:
There is zero runtime cost. In the case of dynamically allocated memory, sizeof gives the size of the static pointer object, not the dynamically allocated memory.