A final(?) effort to reduce memory usage per flow (#1389)
Remove some unused fields and re-organize other ones. In particular: * Update the parameters of `ndpi_ssl_version2str()` function * Zattoo, Thunder: these timestamps aren't really used. * Ftp/mail: these protocols are dissected only over TCP. * Attention must be paid to TLS.Bittorrent flows to avoid invalid read/write to `flow->protos.bittorrent.hash` field. This is the last(?) commit of a long series (see22241a1d,227e586e,730c2360,a8ffcd8b) aiming to reduce library memory consumption. Before, at nDPI 4.0 (more precisly, ata6b10cf7, because memory stats were wrong until that commit): ``` nDPI Memory statistics: nDPI Memory (once): 221.15 KB Flow Memory (per flow): 2.94 KB ``` Now: ``` nDPI Memory statistics: nDPI Memory (once): 231.71 KB Flow Memory (per flow): 1008 B <--------- ``` i.e. memory usage per flow has been reduced by 66%, dropping below the psychological threshold of 1 KB. To further reduce this value, we probably need to look into #1279: let's fight this battle another day.
This commit is contained in:
@@ -975,7 +975,7 @@ extern "C" {
|
||||
/* Return a flow info string (summarized). Does only work for DNS/HTTP/TLS/QUIC. */
|
||||
const char* ndpi_get_flow_info(struct ndpi_flow_struct const * const flow,
|
||||
ndpi_protocol const * const l7_protocol);
|
||||
char* ndpi_ssl_version2str(struct ndpi_flow_struct *flow,
|
||||
char* ndpi_ssl_version2str(char *buf, int buf_len,
|
||||
u_int16_t version, u_int8_t *unknown_tls_version);
|
||||
int ndpi_netbios_name_interpret(u_char *in, u_int in_len, u_char *out, u_int out_len);
|
||||
void ndpi_patchIPv6Address(char *str);
|
||||
|
||||
Reference in New Issue
Block a user