Its actually doesn't matter which type to use for `p` since it is simply a temporary pointer to freshly allocated memory. You can use `void *p` instead. Thus its makes not much of sense to use `sizeof(p)`. But instead it may make a sense to put `sizeof(*replace_stack)` instead.