mirror of
https://github.com/zeek/zeek.git
synced 2025-10-07 09:08:20 +00:00
simpler public calling interface for computing footprint
This commit is contained in:
parent
15123b6768
commit
7fd94f82a8
2 changed files with 13 additions and 4 deletions
11
src/Val.h
11
src/Val.h
|
@ -127,6 +127,17 @@ public:
|
|||
* The number is not meant to be precise, but rather comparable:
|
||||
* larger footprint correlates with more memory consumption.
|
||||
*
|
||||
* @return The total footprint.
|
||||
*/
|
||||
unsigned int Footprint() const
|
||||
{
|
||||
std::set<const RecordVal*> analyzed_records;
|
||||
return Footprint(&analyzed_records);
|
||||
}
|
||||
|
||||
/**
|
||||
* Internal function for computing a Val's "footprint".
|
||||
*
|
||||
* @param analyzed_records A pointer to a set used to track which
|
||||
* records have been analyzed to date, used to prevent infinite
|
||||
* recursion. The set should be empty (but not nil) on the first call.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue