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

node_crypto_bio: adjust external memory size #1085

Closed

Conversation

indutny
Copy link
Member

@indutny indutny commented Mar 6, 2015

Adjust V8's external memory size when allocating buffers for TLS data to
ensure that V8 has enough information to trigger the GC at right time.
@indutny
Copy link
Member Author

indutny commented Mar 6, 2015

Here are improvised graphs of TLSWrap lifetime without this patch:

leak

And with this patch:

no-leak

@indutny
Copy link
Member Author

indutny commented Mar 6, 2015

It seems to stabilize after 20 minutes in both cases.

@indutny
Copy link
Member Author

indutny commented Mar 6, 2015

Not sure if the patch actually helps that much.

@aredridel
Copy link
Contributor

:/

@indutny
Copy link
Member Author

indutny commented Mar 7, 2015

@aredridel initial GC seems to be much better overall.

@indutny
Copy link
Member Author

indutny commented Mar 7, 2015

@bnoordhuis LGTY?

write_pos_(0),
len_(len),
next_(nullptr) {
explicit Buffer(Environment* env, size_t len) : env_(env),
Copy link
Member

Choose a reason for hiding this comment

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

You can drop the explicit keyword here.

@bnoordhuis
Copy link
Member

LGTM with a suggestion.

indutny added a commit that referenced this pull request Mar 8, 2015
Adjust V8's external memory size when allocating buffers for TLS data to
ensure that V8 has enough information to trigger the GC at right time.

PR-URL: #1085
Reviewed-By: Ben Noordhuis <[email protected]>
@indutny
Copy link
Member Author

indutny commented Mar 8, 2015

Landed in 8670613, thank you!

@indutny indutny closed this Mar 8, 2015
@indutny indutny deleted the feature/adjust-external-tls-buffers branch March 8, 2015 23:08
@rvagg rvagg mentioned this pull request Mar 9, 2015
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

Successfully merging this pull request may close these issues.

3 participants