Skip to content

Commit

Permalink
fix structure size calculation when other structures are inlined
Browse files Browse the repository at this point in the history
  • Loading branch information
FROGGS committed Feb 15, 2016
1 parent 38d9a8b commit f2ae11b
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions src/6model/reprs/CPPStruct.c
Expand Up @@ -263,8 +263,8 @@ static void compute_allocation_strategy(MVMThreadContext *tc, MVMObject *repr_in
repr_data->struct_offsets[i] = cur_size;
cur_size += bits / 8;

if (bits / 8 > multiple_of)
multiple_of = bits / 8;
if (align > multiple_of)
multiple_of = align;
}

/* Finally, put computed allocation size in place; it's body size plus
Expand Down
4 changes: 2 additions & 2 deletions src/6model/reprs/CStruct.c
Expand Up @@ -263,8 +263,8 @@ static void compute_allocation_strategy(MVMThreadContext *tc, MVMObject *repr_in
repr_data->struct_offsets[i] = cur_size;
cur_size += bits / 8;

if (bits / 8 > multiple_of)
multiple_of = bits / 8;
if (align > multiple_of)
multiple_of = align;
}

/* Finally, put computed allocation size in place; it's body size plus
Expand Down

0 comments on commit f2ae11b

Please sign in to comment.