18namespace pw::allocator {
79 return !(*
this == other);
float CalculateFragmentation(const Fragmentation &fragmentation)
Definition: fragmentation.h:47
constexpr bool operator!=(const Fragmentation &other) const
Returns whether this fragmentation struct is different from another.
Definition: fragmentation.h:78
size_t sum
Sum of the inner sizes of free blocks.
Definition: fragmentation.h:57
Fragmentation & operator-=(const Fragmentation &other)
Subtracts another fragmentation struct from this one.
void SubtractFragment(size_t inner_size)
Excludes a region of free memory from the fragmentation calculation.
Fragmentation & operator+=(const Fragmentation &other)
Combines this fragmentation struct with another.
friend Fragmentation operator+(const Fragmentation &lhs, const Fragmentation &rhs)
Combines two fragmentation structs.
Definition: fragmentation.h:83
void AddFragment(size_t inner_size)
Includes a region of free memory in the fragmentation calculation.
friend Fragmentation operator-(const Fragmentation &lhs, const Fragmentation &rhs)
Subtracts one fragmentation struct from another.
Definition: fragmentation.h:91
constexpr bool operator==(const Fragmentation &other) const
Returns whether this fragmentation struct is the same as another.
Definition: fragmentation.h:72
struct pw::allocator::Fragmentation::@1 sum_of_squares
Sum-of-squares of the inner sizes of free blocks.