summaryrefslogtreecommitdiff
path: root/src/node_http2.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/node_http2.h')
-rw-r--r--src/node_http2.h11
1 files changed, 9 insertions, 2 deletions
diff --git a/src/node_http2.h b/src/node_http2.h
index e828999f2b..1812cba51f 100644
--- a/src/node_http2.h
+++ b/src/node_http2.h
@@ -8,6 +8,7 @@
#include "nghttp2/nghttp2.h"
#include "node_http2_state.h"
+#include "node_mem.h"
#include "node_perf.h"
#include "stream_base-inl.h"
#include "string_bytes.h"
@@ -703,7 +704,9 @@ enum SessionBitfieldFlags {
kSessionHasAltsvcListeners
};
-class Http2Session : public AsyncWrap, public StreamListener {
+class Http2Session : public AsyncWrap,
+ public StreamListener,
+ public mem::NgLibMemoryManager<Http2Session, nghttp2_mem> {
public:
Http2Session(Environment* env,
Local<Object> wrap,
@@ -712,7 +715,6 @@ class Http2Session : public AsyncWrap, public StreamListener {
class Http2Ping;
class Http2Settings;
- class MemoryAllocatorInfo;
void EmitStatistics();
@@ -813,6 +815,11 @@ class Http2Session : public AsyncWrap, public StreamListener {
void OnStreamRead(ssize_t nread, const uv_buf_t& buf) override;
void OnStreamAfterWrite(WriteWrap* w, int status) override;
+ // Implementation for mem::NgLibMemoryManager
+ void CheckAllocatedSize(size_t previous_size) const;
+ void IncreaseAllocatedSize(size_t size);
+ void DecreaseAllocatedSize(size_t size);
+
// The JavaScript API
static void New(const FunctionCallbackInfo<Value>& args);
static void Consume(const FunctionCallbackInfo<Value>& args);