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

AdjustExternalMemory #52

Closed
jasongin opened this issue Jan 20, 2017 · 2 comments
Closed

AdjustExternalMemory #52

jasongin opened this issue Jan 20, 2017 · 2 comments

Comments

@jasongin
Copy link
Member

While porting the canvas package to NAPI, I found the canvas code calls Nan::AdjustExternalMemory() in a few places, to give some hints to the V8 GC. That NAN API is a wrapper around v8::Isolate::AdjustAmountOfExternalAllocatedMemory(). It's not critical for the functionality, but I assume it improves GC behavior significantly when working with large amounts of externally-allocated memory (image buffers in the case of canvas).

This is a V8-specific API; JSRT does not appear to have an equivalent. Do we need to expose it in NAPI? Possibly it could be implemented as a no-op on other engines.

@mhdawson
Copy link
Member

nodejs/node#13928

@digitalinfinity
Copy link
Contributor

I think this has been addressed in nodejs/node#14310. Feel free to reopen nodejs/node#13928 if you disagree.

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

3 participants