Public Member Functions | Private Attributes | Friends | List of all members
grpc_core::MemoryQuota Class Referencefinal

#include <memory_quota.h>

Inheritance diagram for grpc_core::MemoryQuota:
Inheritance graph
[legend]

Public Member Functions

MemoryAllocator CreateMemoryAllocator (absl::string_view name) override
 
MemoryOwner CreateMemoryOwner (absl::string_view name)
 
bool IsMemoryPressureHigh () const
 
 MemoryQuota (const MemoryQuota &)=delete
 
 MemoryQuota (MemoryQuota &&)=default
 
 MemoryQuota (std::string name)
 
MemoryQuotaoperator= (const MemoryQuota &)=delete
 
MemoryQuotaoperator= (MemoryQuota &&)=default
 
void SetSize (size_t new_size)
 
 ~MemoryQuota () override
 
- Public Member Functions inherited from grpc_event_engine::experimental::MemoryAllocatorFactory
virtual ~MemoryAllocatorFactory ()=default
 

Private Attributes

std::shared_ptr< BasicMemoryQuotamemory_quota_
 

Friends

class MemoryOwner
 

Detailed Description

Definition at line 421 of file memory_quota.h.

Constructor & Destructor Documentation

◆ MemoryQuota() [1/3]

grpc_core::MemoryQuota::MemoryQuota ( std::string  name)
inlineexplicit

Definition at line 424 of file memory_quota.h.

◆ ~MemoryQuota()

grpc_core::MemoryQuota::~MemoryQuota ( )
inlineoverride

Definition at line 428 of file memory_quota.h.

◆ MemoryQuota() [2/3]

grpc_core::MemoryQuota::MemoryQuota ( const MemoryQuota )
delete

◆ MemoryQuota() [3/3]

grpc_core::MemoryQuota::MemoryQuota ( MemoryQuota &&  )
default

Member Function Documentation

◆ CreateMemoryAllocator()

MemoryAllocator grpc_core::MemoryQuota::CreateMemoryAllocator ( absl::string_view  name)
overridevirtual

On Endpoint creation, call CreateMemoryAllocator to create a new allocator for the endpoint. name is used to label the memory allocator in debug logs. Typically we'll want to: auto allocator = factory->CreateMemoryAllocator(peer_address_string); auto* endpoint = allocator->New<MyEndpoint>(std::move(allocator), ...);

Implements grpc_event_engine::experimental::MemoryAllocatorFactory.

Definition at line 466 of file memory_quota.cc.

◆ CreateMemoryOwner()

MemoryOwner grpc_core::MemoryQuota::CreateMemoryOwner ( absl::string_view  name)

Definition at line 472 of file memory_quota.cc.

◆ IsMemoryPressureHigh()

bool grpc_core::MemoryQuota::IsMemoryPressureHigh ( ) const
inline

Definition at line 444 of file memory_quota.h.

◆ operator=() [1/2]

MemoryQuota& grpc_core::MemoryQuota::operator= ( const MemoryQuota )
delete

◆ operator=() [2/2]

MemoryQuota& grpc_core::MemoryQuota::operator= ( MemoryQuota &&  )
default

◆ SetSize()

void grpc_core::MemoryQuota::SetSize ( size_t  new_size)
inline

Definition at line 441 of file memory_quota.h.

Friends And Related Function Documentation

◆ MemoryOwner

friend class MemoryOwner
friend

Definition at line 451 of file memory_quota.h.

Member Data Documentation

◆ memory_quota_

std::shared_ptr<BasicMemoryQuota> grpc_core::MemoryQuota::memory_quota_
private

Definition at line 452 of file memory_quota.h.


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


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