Is it possible to set a minimal size of a generation 0 heap in .NET?
I have a folowing sistuation. I have a function that allocates around 20-30 MB of 1KB objects, d
I don't think there's any option to set these values in .NET GC.
At first glance, looks like this particular situation justifies the need to have such advanced options, but if this would be a static option that it will affect all the lifetime of you program. A dynamic option, that you could set at runtime would be ideal.
Also, I don't think this will hugely affect the performance of your program, although if you where able to increase the gen(0) size you could free some memory (and gain some performance).
Because the GC is self-tunning, gen(0) will automatically increase size and the BIG objects will end up being garbage collected, sooner or later.