c# - Generating big files in .NET -


i ask on 2 things .net executables:

  1. .net executable in pe format. mean address generated cil compiler beginning of file (address+size_of_headers)? or these address used when executing image in memory?

  2. is possible generate (by cil compiler) executable size greater 4gb? if yes, compiler if has call method end of file or branch byte above 4gb limit?

it's true have never seen c# executable greater 4gb, i'm curios.

i think you're confusing how executing cil works how executing native code works.

with cil, code in executable file not executed. (with desktop clr , without ngen) clr reads cil , generates actual executable code on fly (that's why part of clr called “just in time compiler”).

cil opcodes call use tokens reference methods , other members. in generated native code, translated address of native code method.

opcodes br contain offsets relative next cil instruction , can jump inside current method. on x86, compiled instructions jne, contain offsets relative next x86 instruction.

but metadata method described in methoddef table, contains reference il stream method 4-byte relative virtual address (and rvas used in other parts of file too). think means executable file can't more 4 gb in size.

i attempted verify creating large executable using reflection.emit. best on system 8 gb of ram crating 1.5 gb big file (which made computer unusable due swapping).


Comments

Popular posts from this blog

SPSS keyboard combination alters encoding -

Add new record to the table by click on the button in Microsoft Access -

javascript - jQuery .height() return 0 when visible but non-0 when hidden -