Skip to content

Commit 184d53a

Browse files
committed
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
1 parent 0a25420 commit 184d53a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

oshmem/proc/proc.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,8 +41,8 @@ struct oshmem_group_t;
4141
* so the size of oshmem_proc_data_t must be less or equal than
4242
* OMPI_PROC_PADDING_SIZE */
4343
struct oshmem_proc_data_t {
44-
int num_transports;
4544
char * transport_ids;
45+
int num_transports;
4646
};
4747

4848
typedef struct oshmem_proc_data_t oshmem_proc_data_t;

0 commit comments

Comments
 (0)