GeezerVisonThe World Wide Web, restored to 800 pixels of glory. | ||||||||
| Home|About|Gaming cabinet|Archives|How it works|Starter sites | ||||||||
GeezerVison is showing github.com — diagnostics_channel: fix diagnostics channel memory leak by theanarkh · Pull Request #45633 · nodejs/node Conversation
|
|
LGTM. Not really how users are intended to use diagnostics_channel, but how users are meant to use things and how they actually use them doesn't always match, so seems like a reasonable fix to me. 😅 |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
lgtm
Sorry, something went wrong.
There was an error while loading. Please reload this page.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
Could you add a test for this? Maybe by comparing the values of |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
I think it is difficult to do that, do you have any idea? Thanks! |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
I meant using the code you shared in the PR description with a slight modification - asserting that the value of // Flags: --expose-gc 'use strict'; // This test ensures that diagnostic channel references aren't leaked. require('../common'); const { ok } = require('assert'); const { subscribe, unsubscribe } = require('diagnostics_channel'); function noop() {} const heapUsedBefore = process.memoryUsage().heapUsed; for (let i = 0; i < 1000000; i++) { subscribe(String(i), noop); unsubscribe(String(i), noop); } gc(); const heapUsedAfter = process.memoryUsage().heapUsed; ok(heapUsedBefore >= heapUsedAfter); Is it difficult because it's too flaky? |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
2026e9c to
cf83822
Compare
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
cf83822 to
4fb75ce
Compare
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Sorry, something went wrong.
There was an error while loading. Please reload this page.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
Landed in d579bc1 |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
PR-URL: #45633 Reviewed-By: Stephen Belanger <[email protected]> Reviewed-By: Yagiz Nizipli <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Minwoo Jung <[email protected]> Reviewed-By: Darshan Sen <[email protected]>
PR-URL: #45633 Reviewed-By: Stephen Belanger <[email protected]> Reviewed-By: Yagiz Nizipli <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Minwoo Jung <[email protected]> Reviewed-By: Darshan Sen <[email protected]>
PR-URL: #45633 Reviewed-By: Stephen Belanger <[email protected]> Reviewed-By: Yagiz Nizipli <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Minwoo Jung <[email protected]> Reviewed-By: Darshan Sen <[email protected]>
PR-URL: #45633 Reviewed-By: Stephen Belanger <[email protected]> Reviewed-By: Yagiz Nizipli <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Minwoo Jung <[email protected]> Reviewed-By: Darshan Sen <[email protected]>
There was an error while loading. Please reload this page.
Successfully merging this pull request may close these issues.
There was an error while loading. Please reload this page.