mirror of
https://github.com/zeek/zeek.git
synced 2025-10-06 16:48:19 +00:00
Preallocate booleans and small counts
Like PortManager, preallocate Vals for booleans and counts < 4096
This commit is contained in:
parent
a27ab672d9
commit
dcbef9cbe3
8 changed files with 136 additions and 41 deletions
|
@ -1437,10 +1437,10 @@ void TCP_Analyzer::UpdateConnVal(RecordVal *conn_val)
|
|||
RecordVal *orig_endp_val = conn_val->Lookup("orig")->AsRecordVal();
|
||||
RecordVal *resp_endp_val = conn_val->Lookup("resp")->AsRecordVal();
|
||||
|
||||
orig_endp_val->Assign(0, new Val(orig->Size(), TYPE_COUNT));
|
||||
orig_endp_val->Assign(1, new Val(int(orig->state), TYPE_COUNT));
|
||||
resp_endp_val->Assign(0, new Val(resp->Size(), TYPE_COUNT));
|
||||
resp_endp_val->Assign(1, new Val(int(resp->state), TYPE_COUNT));
|
||||
orig_endp_val->Assign(0, val_mgr->GetCount(orig->Size()));
|
||||
orig_endp_val->Assign(1, val_mgr->GetCount(int(orig->state)));
|
||||
resp_endp_val->Assign(0, val_mgr->GetCount(resp->Size()));
|
||||
resp_endp_val->Assign(1, val_mgr->GetCount(int(resp->state)));
|
||||
|
||||
// Call children's UpdateConnVal
|
||||
Analyzer::UpdateConnVal(conn_val);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue