From: Tom Peters (thopeter) Date: Thu, 13 May 2021 03:43:09 +0000 (+0000) Subject: Merge pull request #2883 in SNORT/snort3 from ~KATHARVE/snort3:h2i_clang_fix to master X-Git-Tag: 3.1.5.0~9 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=fec0a8a785d5b4b096542d2fcb41487ae18c7d06;p=thirdparty%2Fsnort3.git Merge pull request #2883 in SNORT/snort3 from ~KATHARVE/snort3:h2i_clang_fix to master Squashed commit of the following: commit 4ff274cf1142d175009c649f6e7372ed7f18711c Author: Katura Harvey Date: Mon May 10 16:57:29 2021 -0400 http2_inspect: fix non-standard c++ --- diff --git a/src/service_inspectors/http2_inspect/http2_flow_data.cc b/src/service_inspectors/http2_inspect/http2_flow_data.cc index c9264b344..ad2bf3c99 100644 --- a/src/service_inspectors/http2_inspect/http2_flow_data.cc +++ b/src/service_inspectors/http2_inspect/http2_flow_data.cc @@ -44,7 +44,8 @@ uint64_t Http2FlowData::instance_count = 0; #endif // Each stream will have class Http2Stream allocated and a node in streams list -const size_t Http2FlowData::stream_memory_size = sizeof(std::_List_node) + sizeof(class Http2Stream); +const size_t Http2FlowData::stream_memory_size = sizeof(class Http2Stream) + + stream_extra_memory; const size_t Http2FlowData::stream_increment_memory_size = stream_memory_size * STREAM_MEMORY_TRACKING_INCREMENT; diff --git a/src/service_inspectors/http2_inspect/http2_flow_data.h b/src/service_inspectors/http2_inspect/http2_flow_data.h index 740b4e09a..1c5bd6be6 100644 --- a/src/service_inspectors/http2_inspect/http2_flow_data.h +++ b/src/service_inspectors/http2_inspect/http2_flow_data.h @@ -211,6 +211,9 @@ private: void update_stream_memory_deallocations(); static const size_t stream_memory_size; static const size_t stream_increment_memory_size; + // Per-stream extra memory estimate to account for the std::list streams. Actual memory usage + // is implementation dependent + static const size_t stream_extra_memory = 24; }; #endif