class MemoryAllocatorImpl

Defined at line 34 of file ../../third_party/grpc-migrating/src/include/grpc/event_engine/internal/memory_allocator_impl.h

Underlying memory allocation interface.

This is an internal interface, not intended to be used by users.

Its interface is subject to change at any time.

Public Methods

void MemoryAllocatorImpl ()

Defined at line 37 of file ../../third_party/grpc-migrating/src/include/grpc/event_engine/internal/memory_allocator_impl.h

void ~MemoryAllocatorImpl ()

Defined at line 38 of file ../../third_party/grpc-migrating/src/include/grpc/event_engine/internal/memory_allocator_impl.h

void MemoryAllocatorImpl (const MemoryAllocatorImpl & )

Defined at line 40 of file ../../third_party/grpc-migrating/src/include/grpc/event_engine/internal/memory_allocator_impl.h

size_t Reserve (MemoryRequest request)

Reserve bytes from the quota.

If we enter overcommit, reclamation will begin concurrently.

Returns the number of bytes reserved.

If MemoryRequest is invalid, this function will abort.

If MemoryRequest is valid, this function is infallible, and will always

succeed at reserving the some number of bytes between request.min() and

request.max() inclusively.

grpc_slice MakeSlice (MemoryRequest request)

Allocate a slice, using MemoryRequest to size the number of returned

bytes. For a variable length request, check the returned slice length to

verify how much memory was allocated. Takes care of reserving memory for

any relevant control structures also.

void Release (size_t n)

Release some bytes that were previously reserved.

If more bytes are released than were reserved, we will have undefined

behavior.

void Shutdown ()

Shutdown this allocator.

Further usage of Reserve() is undefined behavior.

MemoryAllocatorImpl & operator= (const MemoryAllocatorImpl & )

Defined at line 41 of file ../../third_party/grpc-migrating/src/include/grpc/event_engine/internal/memory_allocator_impl.h