Skip to content
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

GC heap size vs committed #9

Closed
ladeak opened this issue Nov 29, 2020 · 2 comments
Closed

GC heap size vs committed #9

ladeak opened this issue Nov 29, 2020 · 2 comments

Comments

@ladeak
Copy link

ladeak commented Nov 29, 2020

In the last sentence of the following paragraph, I get into some confusion:
https://github.com/Maoni0/mem-doc/blob/master/doc/.NETMemoryPerformanceAnalysis.md#special-handling-of-the-ephemeral-segment

it means this difference can be large, e.g., if there are 32 heaps and each heap has a 50 MB gen0 budget and you look at the heap size right after a GC, the size you see is going to be (32 * 50 = 1.6 GB) less than the committed bytes.

a few lines above it says the gen0 budget will be committed, but my understanding is that the "heap size" term would include "free objects" or in other words all committed memory. So shouldn't the heap size always refer to more than the committed?

@Maoni0
Copy link
Owner

Maoni0 commented Dec 3, 2020

interesting, I didn't get any notification for this so only saw it just now. sorry about that!

free objects are made out of free spaces inbetween live objects. we don't make a free object after the last live object - that free space is called "end of segment" space and we just record that for that segment. so the heap size you get would not include that space because gen0 would end at the last object in gen0.

please let me know if this does not make sense.

@ladeak
Copy link
Author

ladeak commented Dec 3, 2020

Ok, so it is clear this way. "heap size" does not include allocation budget. Thank you for the clarification.

@ladeak ladeak closed this as completed Dec 3, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants