Skip to content

Add memory mangament feature#286

Closed
NickNaso wants to merge 2 commits intonodejs:masterfrom
NickNaso:memory-management
Closed

Add memory mangament feature#286
NickNaso wants to merge 2 commits intonodejs:masterfrom
NickNaso:memory-management

Conversation

@NickNaso
Copy link
Copy Markdown
Member

Added MemoryManagement as class and AdjustExternalMemory function as static method.
For more info see the following issue: #260

For more info see the following issue: #260
Copy link
Copy Markdown
Contributor

@gabrielschulhof gabrielschulhof left a 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.

Comment thread 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
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

"[It is ]Uused ..."

Comment thread 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.
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

"in[v]oked"

Comment thread test/memory_management.cc Outdated
Object exports = Object::New(env);
exports["externalAllocatedMemory"] = Function::New(env, externalAllocatedMemory);
return exports;
} No newline at end of file
Copy link
Copy Markdown
Contributor

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!

Comment thread test/memory_management.js Outdated

function test(binding) {
assert.strictEqual(binding.memory_management.externalAllocatedMemory(), true)
} No newline at end of file
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Ditto.

Copy link
Copy Markdown
Member

@mhdawson mhdawson left a comment

Choose a reason for hiding this comment

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

LGTM

mhdawson pushed a commit that referenced this pull request Jul 4, 2018
Add memory mangament feature For more info see the following issue:
#260

PR-URL: #286
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
Reviewed-By: Gabriel Schulhof <gabriel.schulhof@intel.com>
@mhdawson
Copy link
Copy Markdown
Member

mhdawson commented Jul 4, 2018

Landed as 605aa2b

@mhdawson mhdawson closed this Jul 4, 2018
kevindavies8 added a commit to kevindavies8/node-addon-api-Develop that referenced this pull request Aug 24, 2022
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>
Marlyfleitas added a commit to Marlyfleitas/node-api-addon-Development that referenced this pull request Aug 26, 2022
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>
wroy7860 added a commit to wroy7860/addon-api-benchmark-node that referenced this pull request Sep 19, 2022
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>
johnfrench3 pushed a commit to johnfrench3/node-addon-api-git that referenced this pull request Aug 11, 2023
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>
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