diff options
author | Anna Henningsen <anna@addaleax.net> | 2018-06-10 16:40:13 +0200 |
---|---|---|
committer | Anna Henningsen <anna@addaleax.net> | 2018-07-13 19:53:15 +0200 |
commit | 57e301539bff2599974b7269a56377330c9b730e (patch) | |
tree | 6f5c866728f22bbacb8dadb89a2c8a12e5b66508 /src/node_crypto_bio.h | |
parent | 36cc5f5caf52af895079d153a9131fe2b0c6b8f9 (diff) | |
download | node-new-57e301539bff2599974b7269a56377330c9b730e.tar.gz |
src: enable more detailed memory tracking
This will enable more detailed heap snapshots based on
a newer V8 API.
This commit itself is not tied to that API and could
be backported.
PR-URL: https://github.com/nodejs/node/pull/21742
Reviewed-By: James M Snell <jasnell@gmail.com>
Diffstat (limited to 'src/node_crypto_bio.h')
-rw-r--r-- | src/node_crypto_bio.h | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/node_crypto_bio.h b/src/node_crypto_bio.h index 380a3a6b4c..dea010fa01 100644 --- a/src/node_crypto_bio.h +++ b/src/node_crypto_bio.h @@ -32,7 +32,7 @@ namespace node { namespace crypto { -class NodeBIO { +class NodeBIO : public MemoryRetainer { public: NodeBIO() : env_(nullptr), initial_(kInitialBufferLength), @@ -110,6 +110,11 @@ class NodeBIO { static NodeBIO* FromBIO(BIO* bio); + void MemoryInfo(MemoryTracker* tracker) const override { + tracker->TrackThis(this); + tracker->TrackFieldWithSize("buffer", length_); + } + private: static int New(BIO* bio); static int Free(BIO* bio); |