mirror of
https://github.com/zeek/zeek.git
synced 2025-10-12 19:48:20 +00:00
Remove deprecated MemoryAllocation() methods and related code
This commit is contained in:
parent
d3169e48c0
commit
70e63d4749
39 changed files with 15 additions and 659 deletions
|
@ -269,56 +269,6 @@ void Manager::Weird(const char* name, const IP_Hdr* ip, const char* addl)
|
|||
reporter->Weird(ip->SrcAddr(), ip->DstAddr(), name, addl);
|
||||
}
|
||||
|
||||
unsigned int Manager::SessionMemoryUsage()
|
||||
{
|
||||
unsigned int mem = 0;
|
||||
|
||||
if ( run_state::terminating )
|
||||
// Connections have been flushed already.
|
||||
return 0;
|
||||
|
||||
for ( const auto& entry : session_map )
|
||||
#pragma GCC diagnostic push
|
||||
#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
|
||||
mem += entry.second->MemoryAllocation();
|
||||
#pragma GCC diagnostic pop
|
||||
|
||||
return mem;
|
||||
}
|
||||
|
||||
unsigned int Manager::SessionMemoryUsageVals()
|
||||
{
|
||||
unsigned int mem = 0;
|
||||
|
||||
if ( run_state::terminating )
|
||||
// Connections have been flushed already.
|
||||
return 0;
|
||||
|
||||
for ( const auto& entry : session_map )
|
||||
#pragma GCC diagnostic push
|
||||
#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
|
||||
mem += entry.second->MemoryAllocationVal();
|
||||
#pragma GCC diagnostic pop
|
||||
|
||||
return mem;
|
||||
}
|
||||
|
||||
unsigned int Manager::MemoryAllocation()
|
||||
{
|
||||
if ( run_state::terminating )
|
||||
// Connections have been flushed already.
|
||||
return 0;
|
||||
|
||||
#pragma GCC diagnostic push
|
||||
#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
|
||||
return SessionMemoryUsage() + padded_sizeof(*this) +
|
||||
(session_map.size() * (sizeof(SessionMap::key_type) + sizeof(SessionMap::value_type))) +
|
||||
zeek::detail::fragment_mgr->MemoryAllocation();
|
||||
// FIXME: MemoryAllocation() not implemented for rest.
|
||||
;
|
||||
#pragma GCC diagnostic pop
|
||||
}
|
||||
|
||||
void Manager::InsertSession(detail::Key key, Session* session)
|
||||
{
|
||||
session->SetInSessionTable(true);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue