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

The reported freed memory is incorrect #262

Open
Kadri314 opened this issue Aug 24, 2022 · 0 comments
Open

The reported freed memory is incorrect #262

Kadri314 opened this issue Aug 24, 2022 · 0 comments

Comments

@Kadri314
Copy link

Kadri314 commented Aug 24, 2022

There are some cases, the GC pauses increase the memory heap size, example below:

[2022-08-23T14:36:33.337+0200][0.157s] GC(2) Pause Young (Normal) (G1 Evacuation Pause) 147M->148M(1028M) 7.903ms --> increased by 1mb

the GCVIWER in this case will do the following:
before= 147
after=148
totalFreedMemory+=before - after ;
--> in this case we subtract the totalFreedMemory by (1)

The solution should avoid adding into the totalFreedMemory when before-after is <0 :
before= 147
after=148
diff= before - after
totalFreedMemory+= diff >= 0 ? diff : 0

Please apply a fix to this issue, as the reported totalFreedMemory is incorrect.

Regards,
Alkadri

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

1 participant