Go to the documentation of this file.
14 #ifndef GRPC_EVENT_ENGINE_MEMORY_REQUEST_H
15 #define GRPC_EVENT_ENGINE_MEMORY_REQUEST_H
22 #include "absl/strings/string_view.h"
25 namespace experimental {
47 size_t min()
const {
return min_; }
48 size_t max()
const {
return max_; }
51 return min_ == other.min_ && max_ == other.max_;
54 return !(*
this == other);
57 template <
typename Sink>
59 if (r.min_ == r.max_) {
60 s.Append(std::to_string(r.min_));
62 s.Append(std::to_string(r.min_));
64 s.Append(std::to_string(r.max_));
76 #endif // GRPC_EVENT_ENGINE_MEMORY_REQUEST_H
size_t max() const
Definition: memory_request.h:48
MemoryRequest(size_t min, size_t max)
Request a range of memory.
Definition: memory_request.h:36
bool operator!=(const MemoryRequest &other) const
Definition: memory_request.h:53
Reservation request - how much memory do we want to allocate?
Definition: memory_request.h:28
MemoryRequest Increase(size_t amount) const
Increase the size by amount.
Definition: memory_request.h:43
friend void AbslStringify(Sink &s, const MemoryRequest &r)
Definition: memory_request.h:58
bool operator==(const MemoryRequest &other) const
Definition: memory_request.h:50
size_t min() const
Definition: memory_request.h:47
Definition: endpoint_config.h:24
MemoryRequest(size_t n)
Request a fixed amount of memory.
Definition: memory_request.h:32
static constexpr size_t max_allowed_size()
Maximum allowable request size - hard coded to 1GB.
Definition: memory_request.h:39