Merge remote-tracking branch 'origin/fastpath'

Closes #986

* origin/fastpath:
  Do not allocate one OpaqueType per OpaqueVal.
  Fix memory-leak in OpaqueVal.
This commit is contained in:
Robin Sommer 2013-05-03 15:54:47 -07:00
commit 75cbce8ea4
6 changed files with 43 additions and 6 deletions

View file

@ -239,6 +239,11 @@ TableType* record_field_table;
StringVal* cmd_line_bpf_filter;
OpaqueType* md5_type;
OpaqueType* sha1_type;
OpaqueType* sha256_type;
OpaqueType* entropy_type;
#include "const.bif.netvar_def"
#include "types.bif.netvar_def"
#include "event.bif.netvar_def"
@ -298,6 +303,11 @@ void init_general_global_var()
cmd_line_bpf_filter =
internal_val("cmd_line_bpf_filter")->AsStringVal();
md5_type = new OpaqueType("md5");
sha1_type = new OpaqueType("sha1");
sha256_type = new OpaqueType("sha256");
entropy_type = new OpaqueType("entropy");
}
void init_net_var()
@ -346,7 +356,7 @@ void init_net_var()
opt_internal_int("tcp_excessive_data_without_further_acks");
x509_type = internal_type("X509")->AsRecordType();
socks_address = internal_type("SOCKS::Address")->AsRecordType();
non_analyzed_lifetime = opt_internal_double("non_analyzed_lifetime");