From 184d53a018235793fe8bba14b1305102ac4b4061 Mon Sep 17 00:00:00 2001 From: Gilles Gouaillardet Date: Wed, 31 Aug 2016 09:06:57 +0900 Subject: [PATCH] oshmem: swap fields of oshmem_proc_data_t to prevent padding previously, the definition was struct oshmem_proc_data_t { int num_transports; char * transport_ids; }; so in 64 bits arch, the compiler would very likely insert a 4 bytes padding before the two fields in order to have transport_ids aligned --- oshmem/proc/proc.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/oshmem/proc/proc.h b/oshmem/proc/proc.h index e399f389e8..5e4b3ab354 100644 --- a/oshmem/proc/proc.h +++ b/oshmem/proc/proc.h @@ -41,8 +41,8 @@ struct oshmem_group_t; * so the size of oshmem_proc_data_t must be less or equal than * OMPI_PROC_PADDING_SIZE */ struct oshmem_proc_data_t { - int num_transports; char * transport_ids; + int num_transports; }; typedef struct oshmem_proc_data_t oshmem_proc_data_t;