-
-
Notifications
You must be signed in to change notification settings - Fork 32.2k
Closed
Labels
cryptoIssues and PRs related to the crypto subsystem.Issues and PRs related to the crypto subsystem.memoryIssues and PRs related to the memory management or memory footprint.Issues and PRs related to the memory management or memory footprint.
Description
- Version: v6.9.4 & v8.1.2
- Platform: Linux 3.10.0-514.21.2.el7.x86_64 deps: update openssl to 1.0.1j #1 SMP Tue Jun 20 12:24:47 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux
If I run cipher related function many times, I can see memory growth even though execute gc manually.
To be more specific, if I use cipher.final(), it causes memory growth.
Below is test code.
var crypto = require('crypto');
function testCipher() {
var cipher = crypto.createCipheriv('aes-128-gcm', Buffer.from('1234567890123456'), Buffer.from('a1'));
cipher.setAutoPadding(false);
return Buffer.concat([cipher.update(Buffer.from('datas')), cipher.final()]);
}
for (var i = 0; i < 100000000; i++) {
testCipher();
if (i % 200000 === 0) {
gc(true);
}
}
schmod
Metadata
Metadata
Assignees
Labels
cryptoIssues and PRs related to the crypto subsystem.Issues and PRs related to the crypto subsystem.memoryIssues and PRs related to the memory management or memory footprint.Issues and PRs related to the memory management or memory footprint.