mirror of
https://github.com/zeek/zeek.git
synced 2025-10-02 14:48:21 +00:00
Add configure option for preallocating PortVal objects
This commit is contained in:
parent
aa3053db00
commit
4f902c0f39
5 changed files with 41 additions and 0 deletions
|
@ -339,7 +339,12 @@ public:
|
|||
const PortValPtr& Port(uint32_t port_num);
|
||||
|
||||
private:
|
||||
#ifdef PREALLOCATE_PORT_ARRAY
|
||||
std::array<std::array<PortValPtr, 65536>, NUM_PORT_SPACES> ports;
|
||||
#else
|
||||
std::unordered_map<uint32_t, PortValPtr> ports;
|
||||
#endif
|
||||
|
||||
std::array<ValPtr, PREALLOCATED_COUNTS> counts;
|
||||
std::array<ValPtr, PREALLOCATED_INTS> ints;
|
||||
StringValPtr empty_string;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue