blob: 097d6f4706e3bb2aab6745bd1038d3a20056c950 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
|
// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
#include "address_space.h"
#include <ostream>
#include <cassert>
namespace vespalib {
AddressSpace::AddressSpace()
: _used(0),
_dead(0),
_limit(0)
{
}
AddressSpace::AddressSpace(size_t used_, size_t dead_, size_t limit_)
: _used(used_),
_dead(dead_),
_limit(limit_)
{
assert(_used >= _dead);
}
std::ostream &operator << (std::ostream &out, const AddressSpace &rhs)
{
return out << "{used=" << rhs.used() << ", dead=" << rhs.dead() << ", limit=" << rhs.limit() << "}";
}
} // namespace vespalib
|