Panda3D

Loading...
Searching...
No Matches
Public Member Functions | List of all members
MemoryUsagePointerCounts Class Reference

This is a supporting class for MemoryUsage. More...

`#include "memoryUsagePointerCounts.h"`

## Public Member Functions
| MemoryUsagePointerCounts (const MemoryUsagePointerCounts &copy)
void | add_info (MemoryInfo *info)
| Adds a pointer definition to the counter.
void | clear ()
| Resets the counter to empty.
int | get_count () const
| Returns the total number of pointers in the count.
size_t | get_size () const
| Returns the total allocated size of all pointers in the count whose size is known.
bool | is_size_unknown () const
| Returns true if none of the pointers in the count have a known size, or false if at least one of them does.
bool | operator< (const MemoryUsagePointerCounts &other) const
void | operator= (const MemoryUsagePointerCounts &copy)
void | output (std::ostream &out) const

## Detailed Description

This is a supporting class for MemoryUsage.

It tracks the relative counts of a number of pointers of some type (or age), for use by TypeHistogram and AgeHistogram. It's not exported from the DLL, and it doesn't even exist if we're compiling NDEBUG.

Definition at line 27 of file memoryUsagePointerCounts.h.

## Constructor & Destructor Documentation

## ◆ MemoryUsagePointerCounts() [1/2]

MemoryUsagePointerCounts::MemoryUsagePointerCounts | ( |  | ) |
| inline

Definition at line 17 of file memoryUsagePointerCounts.I.

## ◆ MemoryUsagePointerCounts() [2/2]

MemoryUsagePointerCounts::MemoryUsagePointerCounts | ( | const MemoryUsagePointerCounts & | copy | ) |
| inline

Definition at line 27 of file memoryUsagePointerCounts.I.

## Member Function Documentation

## ◆ add_info()

void MemoryUsagePointerCounts::add_info | ( | MemoryInfo * | info | ) |

Adds a pointer definition to the counter.

Definition at line 20 of file memoryUsagePointerCounts.cxx.

## ◆ clear()

void MemoryUsagePointerCounts::clear | ( |  | ) |
| inline

Resets the counter to empty.

Definition at line 48 of file memoryUsagePointerCounts.I.

## ◆ get_count()

int MemoryUsagePointerCounts::get_count | ( |  | ) | const
| inline

Returns the total number of pointers in the count.

Definition at line 76 of file memoryUsagePointerCounts.I.

## ◆ get_size()

size_t MemoryUsagePointerCounts::get_size | ( |  | ) | const
| inline

Returns the total allocated size of all pointers in the count whose size is known.

Definition at line 68 of file memoryUsagePointerCounts.I.

## ◆ is_size_unknown()

bool MemoryUsagePointerCounts::is_size_unknown | ( |  | ) | const
| inline

Returns true if none of the pointers in the count have a known size, or false if at least one of them does.

Definition at line 59 of file memoryUsagePointerCounts.I.

## ◆ operator<()

bool MemoryUsagePointerCounts::operator< | ( | const MemoryUsagePointerCounts & | other | ) | const
| inline

Definition at line 84 of file memoryUsagePointerCounts.I.

## ◆ operator=()

void MemoryUsagePointerCounts::operator= | ( | const MemoryUsagePointerCounts & | copy | ) |
| inline

Definition at line 38 of file memoryUsagePointerCounts.I.

## ◆ output()

void MemoryUsagePointerCounts::output | ( | std::ostream & | out | ) | const

Definition at line 36 of file memoryUsagePointerCounts.cxx.

The documentation for this class was generated from the following files:

- panda/src/express/memoryUsagePointerCounts.h
- panda/src/express/memoryUsagePointerCounts.cxx
- panda/src/express/memoryUsagePointerCounts.I