Skip to content

Commit

Permalink
ch4/proc: use calloc to zero MPIDI_global.avt_mgr.av_table0
Browse files Browse the repository at this point in the history
We need ensure the extra fields, such as MPIDI_OFI_AV(av, all_dest), are
initialized to NULL.
  • Loading branch information
hzhou committed Jan 6, 2025
1 parent 42921d6 commit ab39110
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/mpid/ch4/src/ch4_proc.c
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,7 @@ int MPIDIU_avt_init(void)
int size = MPIR_Process.size;
int rank = MPIR_Process.rank;
size_t table_size = sizeof(MPIDI_av_table_t) + size * sizeof(MPIDI_av_entry_t);
MPIDI_global.avt_mgr.av_table0 = (MPIDI_av_table_t *) MPL_malloc(table_size, MPL_MEM_ADDRESS);
MPIDI_global.avt_mgr.av_table0 = MPL_calloc(1, table_size, MPL_MEM_ADDRESS);
MPIR_Assert(MPIDI_global.avt_mgr.av_table0);

#if MPIDI_CH4_AVTABLE_USE_DDR
Expand Down

0 comments on commit ab39110

Please sign in to comment.