Go to the documentation of this file.
14 #ifndef GRPC_EVENT_ENGINE_INTERNAL_MEMORY_ALLOCATOR_IMPL_H
15 #define GRPC_EVENT_ENGINE_INTERNAL_MEMORY_ALLOCATOR_IMPL_H
19 #include <type_traits>
27 namespace experimental {
35 :
public std::enable_shared_from_this<MemoryAllocatorImpl> {
61 virtual void Release(
size_t n) = 0;
73 #endif // GRPC_EVENT_ENGINE_INTERNAL_MEMORY_ALLOCATOR_IMPL_H
virtual size_t Reserve(MemoryRequest request)=0
Reserve bytes from the quota.
virtual void Shutdown()=0
Shutdown this allocator.
virtual grpc_slice MakeSlice(MemoryRequest request)=0
Allocate a slice, using MemoryRequest to size the number of returned bytes.
Underlying memory allocation interface.
Definition: memory_allocator_impl.h:34
Reservation request - how much memory do we want to allocate?
Definition: memory_request.h:27
virtual void Release(size_t n)=0
Release some bytes that were previously reserved.
A grpc_slice s, if initialized, represents the byte range s.bytes[0..s.length-1].
Definition: slice_type.h:63
MemoryAllocatorImpl & operator=(const MemoryAllocatorImpl &)=delete
MemoryAllocatorImpl()
Definition: memory_allocator_impl.h:37
Definition: endpoint_config.h:24
virtual ~MemoryAllocatorImpl()
Definition: memory_allocator_impl.h:38