Directly use calloc instead of malloc + memset