-
Notifications
You must be signed in to change notification settings - Fork 4.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
In some cases, the generation of living objects after GC should not be increased #4612
Comments
It would also be nice to get some information about the result of the GC *Hibernating Rhinos Ltd * Oren Eini* l CEO l *Mobile: + 972-52-548-6969 Office: +972-4-622-7811 *l *Fax: +972-153-4-622-7811 On Fri, Oct 23, 2015 at 6:40 AM, ygc369 notifications@github.com wrote:
|
Nobody is interested in this? |
Any progress about this issue? |
@ygc369 Do you have more information about use cases for this? Currently I would disagree with this statement:
And if you disagree with that statement, then the rest of the feature becomes unnecessary. It would be very helpful to understand:
|
@ygc369 You don't have to close this issue if you feel strongly it should be changed. But considering how substantial of a change this would be, it's good to be able to explain how it would benefit you in practice. 😄 |
@sharwell
Besides this issue, I have another issue about generation GC: https://github.com/dotnet/coreclr/issues/1856 |
@ygc369 Do you have any data that could back up that claim? It sounds dubious to me. Particularly with a program like this: public class Repro
{
public static void Allocate()
{
object[] onStack = new object[1024];
LoopForever();
}
public static void LoopForever() { while(true) {} }
} |
@sharwell |
@swgillespie |
Sometimes we may want to call GC.collect() to collect garbage at once but do not want to increase generation of living objects after GC. A new parameter should be added to GC.collect() to indicate whether to increase generation of living objects after GC.
If living objects after GC are only referenced by local variables on stack, their generation should not be increased too. Because they are likely to become garbage soon.
The text was updated successfully, but these errors were encountered: