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

Null out references to tmpNioBuf and chunk to allow quicker collecting #6279

Closed
wants to merge 1 commit into
base: 4.1
from

Conversation

Projects
None yet
3 participants
@normanmaurer
Member

normanmaurer commented Jan 26, 2017

Motivation:

In PooledByteBuf we missed to null out the chunk and tmpNioBuf fields before recycle it to the Recycler. This could lead to keep objects longer alive then necessary which may hold a lot of memory.

Modifications:

Null out tmpNioBuf and chunk before recycle.

Result:

Possible to earlier GC objects.

Null out references to tmpNioBuf and chunk to allow quicker collecting
Motivation:

In PooledByteBuf we missed to null out the chunk and tmpNioBuf fields before recycle it to the Recycler. This could lead to keep objects longer alive then necessary which may hold a lot of memory.

Modifications:

Null out tmpNioBuf and chunk before recycle.

Result:

Possible to earlier GC objects.

@normanmaurer normanmaurer added this to the 4.0.44.Final milestone Jan 26, 2017

@normanmaurer normanmaurer requested review from trustin, nmittler and Scottmitch Jan 26, 2017

@normanmaurer

This comment has been minimized.

Show comment
Hide comment
@normanmaurer

normanmaurer Jan 26, 2017

Member

This is interesting as PoolChunk instances may be dropped when not used anymore.

Member

normanmaurer commented Jan 26, 2017

This is interesting as PoolChunk instances may be dropped when not used anymore.

@normanmaurer normanmaurer self-assigned this Jan 26, 2017

@normanmaurer

This comment has been minimized.

Show comment
Hide comment
@normanmaurer

normanmaurer Jan 26, 2017

Member

Cherry-Picked into 4.1 (8dda984) and 4.0 (dcf4292)

Member

normanmaurer commented Jan 26, 2017

Cherry-Picked into 4.1 (8dda984) and 4.0 (dcf4292)

@normanmaurer normanmaurer deleted the null_out_references branch Jan 26, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment