Optimized memory utlization resizing serialization buffer buffer

This commit is contained in:
Alfredo Cardigliano
2019-09-11 16:32:40 +02:00
parent 848c9db4fb
commit 7d9ed162c7
2 changed files with 14 additions and 4 deletions
+4
View File
@@ -1357,6 +1357,9 @@ typedef enum {
ndpi_serialization_string
} ndpi_serialization_type;
#define NDPI_SERIALIZER_DEFAULT_BUFFER_SIZE 8192
#define NDPI_SERIALIZER_DEFAULT_BUFFER_INCR 1024
#define NDPI_SERIALIZER_STATUS_COMMA (1 << 0)
#define NDPI_SERIALIZER_STATUS_ARRAY (1 << 1)
#define NDPI_SERIALIZER_STATUS_EOR (1 << 2)
@@ -1368,6 +1371,7 @@ typedef struct {
typedef struct {
ndpi_private_serializer_status status;
u_int32_t initial_buffer_size;
u_int32_t buffer_size;
ndpi_serialization_format fmt;
u_int8_t *buffer;