mirror of
https://github.com/ntop/ntopng.git
synced 2026-05-01 00:19:33 +00:00
Optimized std::map to reduce memory usage
This commit is contained in:
parent
73df55aeac
commit
d31a57c573
8 changed files with 57 additions and 37 deletions
|
|
@ -36,12 +36,14 @@ class InterfaceMemberAlertableEntity : public OtherAlertableEntity {
|
|||
|
||||
~InterfaceMemberAlertableEntity() {
|
||||
/* Decrease interface number of engaged alerts on the interface */
|
||||
std::map<std::string, Alert>::const_iterator alert_it;
|
||||
std::map<u_int32_t /* std::string */, Alert>::const_iterator alert_it;
|
||||
|
||||
engaged_alerts_lock.wrlock(__FILE__, __LINE__);
|
||||
|
||||
for (u_int p = 0; p < MAX_NUM_PERIODIC_SCRIPTS; p++)
|
||||
for (alert_it = engaged_alerts[p].begin();
|
||||
alert_it != engaged_alerts[p].end(); ++alert_it)
|
||||
for (alert_it = engaged_alerts[p].begin(); alert_it != engaged_alerts[p].end(); ++alert_it)
|
||||
decNumAlertsEngaged(Utils::mapScoreToSeverity(alert_it->second.score));
|
||||
|
||||
engaged_alerts_lock.unlock(__FILE__, __LINE__);
|
||||
};
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue