mirror of
https://github.com/nodejs/node.git
synced 2026-11-24 21:50:36 -05:00
test: use faster variant for rss in test-crypto-dh-leak
PR-URL: https://github.com/nodejs/node/pull/36766 Refs: https://github.com/nodejs/node/pull/34291 Reviewed-By: Gerhard Stöbich <deb2001-github@yahoo.de> Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Michael Dawson <midawson@redhat.com> Reviewed-By: James M Snell <jasnell@gmail.com>
This commit is contained in:
1 parent
2ceb44120b
commit
f4ef517deb
1 file changed
+2
-2
@@ -10,7 +10,7 @@ if (process.config.variables.asan)
|
||||
const assert = require('assert');
|
||||
const crypto = require('crypto');
|
||||
|
||||
const before = process.memoryUsage().rss;
|
||||
const before = process.memoryUsage.rss();
|
||||
{
|
||||
const dh = crypto.createDiffieHellman(common.hasFipsCrypto ? 1024 : 256);
|
||||
const publicKey = dh.generateKeys();
|
||||
@@ -21,7 +21,7 @@ const before = process.memoryUsage().rss;
|
||||
}
|
||||
}
|
||||
global.gc();
|
||||
const after = process.memoryUsage().rss;
|
||||
const after = process.memoryUsage.rss();
|
||||
|
||||
// RSS should stay the same, ceteris paribus, but allow for
|
||||
// some slop because V8 mallocs memory during execution.
|
||||
|
||||
Reference in new issue
Block a user