Skip to content

Commit

Permalink
Reduce alignment of dispatch maps (dotnet#65823)
Browse files Browse the repository at this point in the history
We've been aligning these at 16 bytes [since dispatch maps were added](dotnet/corert#626) in 2016. Not clear where the 16 came from. Rhbind seems to be aligning these at pointer boundaries, but we only place `ushort`s in here.

This likely results in some size savings.
  • Loading branch information
MichalStrehovsky authored Feb 24, 2022
1 parent 858221c commit 6e99b58
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -234,7 +234,7 @@ void EmitDispatchMap(ref ObjectDataBuilder builder, NodeFactory factory)
public override ObjectData GetData(NodeFactory factory, bool relocsOnly = false)
{
ObjectDataBuilder objData = new ObjectDataBuilder(factory, relocsOnly);
objData.RequireInitialAlignment(16);
objData.RequireInitialAlignment(2);
objData.AddSymbol(this);

if (!relocsOnly)
Expand Down

0 comments on commit 6e99b58

Please sign in to comment.