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

Simplify memory handling by removing pointless calls to pfree #8

Closed
wants to merge 1 commit into from
Closed

Conversation

DuncanSands
Copy link

The call to MemoryContextReset frees all allocated memory in one fell swoop, so the calls to pfree are totally useless and just complicate the logic. Tested by streaming 100 million rows and observing that memory usage did not increase.

…oth more

efficient and more reliable than individually freeing each allocated object.
@hchiorean
Copy link

👍

@gunnarmorling
Copy link
Member

Thanks for submitting the change, @DuncanSands, and thanks for the quick review, @hchiorean!

One thing only, @DuncanSands, could you file a JIRA issue and refer to it in the commit message?

Copy link
Member

@rhauch rhauch left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, @DuncanSands!

@gunnarmorling
Copy link
Member

I've filed https://issues.jboss.org/browse/DBZ-496 and applied this PR. Thanks @DuncanSandsl and sorry for the long delay, this fell a bit through the cracks.

@DuncanSands
Copy link
Author

DuncanSands commented Dec 5, 2017 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
4 participants