what does 'code size' in MSIL mean

Viewed 768

When you see a line in the IL like:

// Code size       25 (0x19)

what does nit actually mean? Is it talking about the (bytes of) memory usage? All I was able to gather was that it is one more than the number of IL lines. Below is the full IL.

.method private hidebysig static void  Execute(string y) cil managed
{
  // Code size       25 (0x19)
  .maxstack  8
  IL_0000:  nop
  IL_0001:  ldstr      "string"
  IL_0006:  call       void [mscorlib]System.Console::WriteLine(string)
  IL_000b:  nop
  IL_000c:  ldarg.0
  IL_000d:  callvirt   instance class [mscorlib]System.Type [mscorlib]System.Object::GetType()
  IL_0012:  call       void [mscorlib]System.Console::WriteLine(object)
  IL_0017:  nop
  IL_0018:  ret
} //

When I look at ECMA_335 documentation, it defines code size as: Size of the code (text) section, or the sum of all code sections if there are multiple sections. (huh?)

1 Answers
Related