1

Topic: The structure is more 64 byte where will be allocated?

Colleagues, already considered This subject at a forum. How much I remember - if structure more than a machine word on the given computer it is allocated not in the stack, and in a heap. And like as was to become about it in MSDN, only I now cannot find it. Can confirm or refute the given fact?

2

Re: The structure is more 64 byte where will be allocated?

Hello, Nikita Lyapin, you wrote: NL> Colleagues, NL> already considered This subject at a forum. How much I remember - if structure more than a machine word on the given computer it is allocated not in the stack, and in a heap. And like as was to become about it in MSDN, only I now cannot find it. Can confirm or refute the given fact? If it is local variable - that irrespective of the size will be in a stack. It if  and not to take into consideration a lambda. If it is detailed - read https://blogs.msdn.microsoft.com/ericli … lue-types/ https://blogs.msdn.microsoft.com/ericli … -part-one/ https://blogs.msdn.microsoft.com/ericli … rt-two/... <<RSDN@Home 1.0.0 alpha 5 rev. 0>>

3

Re: The structure is more 64 byte where will be allocated?

Hello, Nikita Lyapin, you wrote: NL> Colleagues, NL> already considered This subject at a forum. How much I remember - if structure more than a machine word on the given computer it is allocated not in the stack, and in a heap. And like as was to become about it in MSDN, only I now cannot find it. Can confirm or refute the given fact? Made a test example, x64 the assembly. struct S64 {public long p1, p2, p3, p4, p5, p6, p7, p8; public byte p65;} class C64 {public long p1, p2, p3, p4, p5, p6, p7, p8; public byte p65;} static void F <T> (long l) where T: new () {if (l == 0) {return;} var e = new T ();//S64 - stack, C64 - heap F <T> (l - 1);} static void Main (string [] args) {GC.Collect (); GC.WaitForFullGCComplete (); F <C64> (20000);//Pass GC.Collect (); GC.WaitForFullGCComplete (); F <S64> (20000);//Fail, stack overflow-> S64 is allocated on stack}

4

Re: The structure is more 64 byte where will be allocated?

Hello, Nikita Lyapin, you wrote: NL> Colleagues, NL> already considered This subject at a forum. How much I remember - if structure more than a machine word... Strictly speaking, your reasonings "". You work with the VIRTUAL MACHINE, . Any "machine words" there are not present and in . All  a part - the closed box also can change though every month.

5

Re: The structure is more 64 byte where will be allocated?

Hello, Kolesiki, you wrote: K> Hello, Nikita Lyapin, you wrote: NL>> Colleagues, NL>> already considered This subject at a forum. How much I remember - if structure more than a machine word... K> Strictly speaking, your reasonings "". You work with the VIRTUAL MACHINE, . Any "machine words" there are not present and in . All  a part - the closed box also can change though every month. What  the virtual machine in.Net Native? Yes RuyJit  it is not strong. As it is possible to speak about any  the compiler

6

Re: The structure is more 64 byte where will be allocated?

Hello, Kolesiki, you wrote: K> Strictly speaking, your reasonings "". You work with the VIRTUAL MACHINE, . Any "machine words" there are not present and in . All  a part - the closed box also can change though every month. But for this virtual machine it should be withstood same memory model, differently we receive problems with backward compatibility, performance degradation both other and other.

7

Re: The structure is more 64 byte where will be allocated?

Hello, Mr. Delphist, you wrote: MD> But for this virtual machine it should be withstood same memory model by Shta?? You there on Turbo-si  still write? Small, large, tiny... As I will recall, so I will shudder! There are no memory model years 30. Storage is necessary - requested of OS a piece. And with 64-bit  even the size of a piece lost any meaning. Certainly, JIT' it is necessary  to create the correct sizes, but here these games "in a stack or not?" - my God... Leave already them, get out of 20 centuries and start to create something useful! For a long time already  all chewed: if you - "old " which went in cycles in gland - continue to write on these OOPs-assemblers.  invented for ever to stop to take for a ride unnecessary details - simply sit down and write the effective code. If the program brakes, in most cases it is a jamb of the programmer, instead of "in a stack or not?".

8

Re: The structure is more 64 byte where will be allocated?

Hello, Kolesiki, you wrote: K> Shta?? You there on Turbo-si  still write? Small, large, tiny... As I will recall, so I will shudder! K> there are no memory model years 30. Storage is necessary - requested of OS a piece. And with 64-bit  even the size of a piece lost any meaning. K> it is finite, JIT' it is necessary  to create the correct sizes, but here these games "in a stack or not?" - my God... Leave already them, get out of 20 centuries and start to create something useful! For a long time already  all chewed: if you - "old " which went in cycles in gland - continue to write on these OOPs-assemblers.  invented for ever to stop to take for a ride unnecessary details - simply sit down and write the effective code. If the program brakes, in most cases it is a jamb of the programmer, instead of "in a stack or not?" . It is similar you at all in a subject. What for it is necessary Thread. MemoryBarrier? Did not ask such question? And if it is detailed, here: the link

9

Re: The structure is more 64 byte where will be allocated?

Hello, Kolesiki, you wrote: K> Hello, Mr. Delphist, you wrote: MD>> But for this virtual machine Shta should be withstood same memory model K>?? You there on Turbo-si  still write? Small, large, tiny... As I will recall, so I will shudder! K> there are no memory model years 30. Storage is necessary - requested of OS a piece. And with 64-bit  even the size of a piece lost any meaning. "That" model of storage in terms small/large/tiny/huge is not present for a long time already, certainly. But need to designate game rules by operation with storage anywhere did not get to, and for multinuclear/MULTISOCKET machines generally rose to the utmost: reordering and other CPU-level optimization should have the guaranteed scenario of operation, differently will be as with 3D Max and other  at the time of Pentiums: on Intel works , and on AMD hangs through time.