mirror of
https://github.com/zeek/zeek.git
synced 2025-10-07 00:58:19 +00:00
Preallocate all possible PortVals.
The performance benefit is small (maybe ~1% at most), however, it's a trivial change without downsides.
This commit is contained in:
parent
895e7b06b1
commit
1e4964de77
29 changed files with 139 additions and 68 deletions
|
@ -166,7 +166,7 @@ RecordVal* EventMgr::GetLocalPeerVal()
|
|||
src_val = new RecordVal(peer);
|
||||
src_val->Assign(0, new Val(0, TYPE_COUNT));
|
||||
src_val->Assign(1, new AddrVal("127.0.0.1"));
|
||||
src_val->Assign(2, new PortVal(0));
|
||||
src_val->Assign(2, port_mgr->Get(0));
|
||||
src_val->Assign(3, new Val(true, TYPE_BOOL));
|
||||
|
||||
Ref(peer_description);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue