14 lines
423 B
JavaScript
14 lines
423 B
JavaScript
|
|
/**
|
||
|
|
* Native mlock addon entry point.
|
||
|
|
* Loaded via node-gyp-build which selects the correct pre-built binary for
|
||
|
|
* the current platform/Node.js version, or falls back to building from source.
|
||
|
|
*
|
||
|
|
* Returns null if the native addon is not available, allowing the JS layer
|
||
|
|
* to fall back to pure-JS zeroing.
|
||
|
|
*/
|
||
|
|
try {
|
||
|
|
module.exports = require('node-gyp-build')(__dirname);
|
||
|
|
} catch (_e) {
|
||
|
|
module.exports = null;
|
||
|
|
}
|