Preallocate booleans and small counts

Like PortManager, preallocate Vals for booleans and counts < 4096
This commit is contained in:
Justin Azoff 2019-01-03 10:17:26 -05:00 committed by Jon Siwek
parent a27ab672d9
commit dcbef9cbe3
8 changed files with 136 additions and 41 deletions

View file

@ -83,6 +83,7 @@ int perftools_profile = 0;
DNS_Mgr* dns_mgr;
TimerMgr* timer_mgr;
ValManager* val_mgr = 0;
PortManager* port_mgr = 0;
logging::Manager* log_mgr = 0;
threading::Manager* thread_mgr = 0;
@ -382,6 +383,7 @@ void terminate_bro()
delete reporter;
// broker_mgr is deleted via iosource_mgr
delete iosource_mgr;
delete val_mgr;
delete port_mgr;
reporter = 0;
@ -774,6 +776,7 @@ int main(int argc, char** argv)
bro_start_time = current_time(true);
val_mgr = new ValManager();
port_mgr = new PortManager();
reporter = new Reporter();
thread_mgr = new threading::Manager();