Skip to content

Commit a216cf3

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 c4171d9 commit a216cf3

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
@@ -38,8 +38,8 @@ struct oshmem_group_t;
3838
#define OSHMEM_PE_INVALID (-1)
3939

4040
struct oshmem_proc_data_t {
41-
int num_transports;
4241
char * transport_ids;
42+
int num_transports;
4343
};
4444

4545
typedef struct oshmem_proc_data_t oshmem_proc_data_t;

0 commit comments

Comments
 (0)