-
Notifications
You must be signed in to change notification settings - Fork 459
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
Add memory mangament feature #286
Conversation
For more info see the following issue: #260
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM with these minor changes.
doc/memory_management.md
Outdated
### AdjustExternalMemory | ||
|
||
The function `AdjustExternalMemory` adjusts the amount of registered external | ||
memory. Used to give the JavaScript engine an indication of the amount of externally |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"[It is ]Uused ..."
doc/memory_management.md
Outdated
static int64_t MemoryManagement::AdjustExternalMemory(Env env, int64_t change_in_bytes); | ||
``` | ||
|
||
- `[in] env`: The environment in which the API is inoked under. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"in[v]oked"
Object exports = Object::New(env); | ||
exports["externalAllocatedMemory"] = Function::New(env, externalAllocatedMemory); | ||
return exports; | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please add a newline to the end of the file!
|
||
function test(binding) { | ||
assert.strictEqual(binding.memory_management.externalAllocatedMemory(), true) | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ditto.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Landed as 605aa2b |
Add memory mangament feature For more info see the following issue: nodejs/node-addon-api#260 PR-URL: nodejs/node-addon-api#286 Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com> Reviewed-By: Gabriel Schulhof <gabriel.schulhof@intel.com>
Add memory mangament feature For more info see the following issue: nodejs/node-addon-api#260 PR-URL: nodejs/node-addon-api#286 Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com> Reviewed-By: Gabriel Schulhof <gabriel.schulhof@intel.com>
Add memory mangament feature For more info see the following issue: nodejs/node-addon-api#260 PR-URL: nodejs/node-addon-api#286 Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com> Reviewed-By: Gabriel Schulhof <gabriel.schulhof@intel.com>
Add memory mangament feature For more info see the following issue: nodejs/node-addon-api#260 PR-URL: nodejs/node-addon-api#286 Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com> Reviewed-By: Gabriel Schulhof <gabriel.schulhof@intel.com>
Added
MemoryManagement
as class andAdjustExternalMemory
function as static method.For more info see the following issue: #260