GRPC C++  1.62.0
Public Member Functions | Static Public Member Functions
grpc_event_engine::experimental::MemoryRequest Class Reference

Reservation request - how much memory do we want to allocate? More...

#include <memory_request.h>

Public Member Functions

 MemoryRequest (size_t n)
 Request a fixed amount of memory. More...
 
 MemoryRequest (size_t min, size_t max)
 Request a range of memory. More...
 
MemoryRequest Increase (size_t amount) const
 Increase the size by amount. More...
 
size_t min () const
 
size_t max () const
 

Static Public Member Functions

static constexpr size_t max_allowed_size ()
 Maximum allowable request size - hard coded to 1GB. More...
 

Detailed Description

Reservation request - how much memory do we want to allocate?

Constructor & Destructor Documentation

◆ MemoryRequest() [1/2]

grpc_event_engine::experimental::MemoryRequest::MemoryRequest ( size_t  n)
inline

Request a fixed amount of memory.

◆ MemoryRequest() [2/2]

grpc_event_engine::experimental::MemoryRequest::MemoryRequest ( size_t  min,
size_t  max 
)
inline

Request a range of memory.

Requires: min <= max. Requires: max <= max_size()

Member Function Documentation

◆ Increase()

MemoryRequest grpc_event_engine::experimental::MemoryRequest::Increase ( size_t  amount) const
inline

Increase the size by amount.

Undefined behavior if min() + amount or max() + amount overflows.

◆ max()

size_t grpc_event_engine::experimental::MemoryRequest::max ( ) const
inline

◆ max_allowed_size()

static constexpr size_t grpc_event_engine::experimental::MemoryRequest::max_allowed_size ( )
inlinestaticconstexpr

Maximum allowable request size - hard coded to 1GB.

◆ min()

size_t grpc_event_engine::experimental::MemoryRequest::min ( ) const
inline

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