From adfe2a9b2f68284abd298aca9e9f3a248326bffe Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michal=20Strehovsk=C3=BD?= Date: Thu, 24 Feb 2022 10:50:00 +0900 Subject: [PATCH] Reduce alignment of dispatch maps We've been aligning these at 16 bytes [since dispatch maps were added](https://github.com/dotnet/corert/pull/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. --- .../Compiler/DependencyAnalysis/InterfaceDispatchMapNode.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/coreclr/tools/aot/ILCompiler.Compiler/Compiler/DependencyAnalysis/InterfaceDispatchMapNode.cs b/src/coreclr/tools/aot/ILCompiler.Compiler/Compiler/DependencyAnalysis/InterfaceDispatchMapNode.cs index 84688a534bf3e9..201fe5a74a0511 100644 --- a/src/coreclr/tools/aot/ILCompiler.Compiler/Compiler/DependencyAnalysis/InterfaceDispatchMapNode.cs +++ b/src/coreclr/tools/aot/ILCompiler.Compiler/Compiler/DependencyAnalysis/InterfaceDispatchMapNode.cs @@ -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)