]> git.ipfire.org Git - thirdparty/snort3.git/commitdiff
Merge pull request #2883 in SNORT/snort3 from ~KATHARVE/snort3:h2i_clang_fix to master
authorTom Peters (thopeter) <thopeter@cisco.com>
Thu, 13 May 2021 03:43:09 +0000 (03:43 +0000)
committerTom Peters (thopeter) <thopeter@cisco.com>
Thu, 13 May 2021 03:43:09 +0000 (03:43 +0000)
Squashed commit of the following:

commit 4ff274cf1142d175009c649f6e7372ed7f18711c
Author: Katura Harvey <katharve@cisco.com>
Date:   Mon May 10 16:57:29 2021 -0400

    http2_inspect: fix non-standard c++

src/service_inspectors/http2_inspect/http2_flow_data.cc
src/service_inspectors/http2_inspect/http2_flow_data.h

index c9264b3441d494240339f85eedbe4a8302730fb2..ad2bf3c99454ee5243d3126de6c15e7cc4ea1381 100644 (file)
@@ -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<Http2Stream*>) + 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;
 
index 740b4e09adcaad177d65d949e06509837aac7232..1c5bd6be69593cf331a084b3df9677d73159994a 100644 (file)
@@ -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