What is the package size?

I read about unmanaged code in C # and came across the following line: -

In a C # program, the CLR finds the offset using field tokens.
C field names are directly compiled into offsets. For access speed, each field is placed with an offset that is a multiple of the size of the field.
However, this factor is limited by the maximum number of bytes x, where x is the "packet size".

My question is what is the package size?

+3
source share
2 answers

, . , , , . , , 2 , 4- . , , .

msdn .

:

. , 4 . 4 . , 4 , .

- . 0 X, 1, 2 3 (X + 1), (X + 2) (X + 3). X- 4 (X 4), .

, , , 4, , . .

...

, , . , int 32- 4 . , .

, int 2 . , short int 0 - 1 2 - 3 . 8 . .

, 8- 32 . 64- , , 8 .

,

+2

, devshorts. - , , .

#pragma . Intel, . 8 - . 1 4. Pack [StructLayout] , , , .

+4

All Articles