name-rev: use sizeof(*ptr) instead of sizeof(type) in allocation