Public Member Functions | Static Public Member Functions | Private Attributes | List of all members
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 Increase (size_t amount) const
 
size_t max () const
 
 MemoryRequest (size_t min, size_t max)
 
 MemoryRequest (size_t n)
 Request a fixed amount of memory. More...
 
size_t min () const
 

Static Public Member Functions

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

Private Attributes

size_t max_
 
size_t min_
 

Detailed Description

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

Definition at line 27 of file memory_request.h.

Constructor & Destructor Documentation

◆ MemoryRequest() [1/2]

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

Request a fixed amount of memory.

Definition at line 31 of file memory_request.h.

◆ 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()

Definition at line 35 of file memory_request.h.

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.

Definition at line 42 of file memory_request.h.

◆ max()

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

Definition at line 47 of file memory_request.h.

◆ max_allowed_size()

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

Maximum allowable request size - hard coded to 1GB.

Definition at line 38 of file memory_request.h.

◆ min()

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

Definition at line 46 of file memory_request.h.

Member Data Documentation

◆ max_

size_t grpc_event_engine::experimental::MemoryRequest::max_
private

Definition at line 51 of file memory_request.h.

◆ min_

size_t grpc_event_engine::experimental::MemoryRequest::min_
private

Definition at line 50 of file memory_request.h.


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


grpc
Author(s):
autogenerated on Fri May 16 2025 03:03:40