As you know value types are allocated on the stack unlike reference types which are allocated on the GC heap.
就像你知道的那样,值类型是分配在栈上的,而引用类型是分配在GC堆上的。
2
A good starting point would be 512mb, then move up or down to determine optimal value, measure throughput or response times, and analyze GC logs to understand frequency and length of scavenges.
The object cannot be moved in this GC cycle; we cannot fix up the reference as it may not be a real reference but simply an integer that happens to have the same value as an object on the heap.