Main Page
Related Pages
Modules
Namespaces
Namespace List
Namespace Members
All
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Functions
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Variables
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Typedefs
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
r
s
t
u
v
w
y
z
Enumerations
a
b
c
d
e
f
g
h
i
j
l
m
n
o
p
r
s
t
u
v
w
Enumerator
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
r
s
t
u
z
Classes
Class List
Class Hierarchy
Class Members
All
:
[
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
~
Functions
[
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
~
Variables
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Typedefs
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
r
s
t
u
v
w
y
Enumerations
a
b
c
d
e
f
h
i
k
l
m
n
o
p
r
s
t
u
v
w
Enumerator
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
z
Properties
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
r
s
t
u
v
w
Related Functions
:
a
b
c
d
e
f
g
h
i
j
l
m
n
o
p
q
r
s
t
u
v
w
z
Files
File List
File Members
All
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Functions
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
z
Variables
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Typedefs
_
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
q
r
s
t
u
v
w
x
z
Enumerations
_
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
r
s
t
u
v
w
x
Enumerator
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
r
s
t
u
v
w
x
Macros
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
grpc
include
grpc
event_engine
memory_request.h
Go to the documentation of this file.
1
// Copyright 2021 The gRPC Authors
2
//
3
// Licensed under the Apache License, Version 2.0 (the "License");
4
// you may not use this file except in compliance with the License.
5
// You may obtain a copy of the License at
6
//
7
// http://www.apache.org/licenses/LICENSE-2.0
8
//
9
// Unless required by applicable law or agreed to in writing, software
10
// distributed under the License is distributed on an "AS IS" BASIS,
11
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
// See the License for the specific language governing permissions and
13
// limitations under the License.
14
#ifndef GRPC_EVENT_ENGINE_MEMORY_REQUEST_H
15
#define GRPC_EVENT_ENGINE_MEMORY_REQUEST_H
16
17
#include <
grpc/support/port_platform.h
>
18
19
#include <stddef.h>
20
21
#include "absl/strings/string_view.h"
22
23
namespace
grpc_event_engine
{
24
namespace
experimental {
25
27
class
MemoryRequest
{
28
public
:
30
// NOLINTNEXTLINE(google-explicit-constructor)
31
MemoryRequest
(
size_t
n) :
min_
(
n
),
max_
(
n
) {}
35
MemoryRequest
(
size_t
min
,
size_t
max
) :
min_
(
min
),
max_
(
max
) {}
36
38
static
constexpr
size_t
max_allowed_size
() {
return
1024 * 1024 * 1024; }
39
42
MemoryRequest
Increase
(
size_t
amount)
const
{
43
return
MemoryRequest
(
min_
+ amount,
max_
+ amount);
44
}
45
46
size_t
min
()
const
{
return
min_
; }
47
size_t
max
()
const
{
return
max_
; }
48
49
private
:
50
size_t
min_
;
51
size_t
max_
;
52
};
53
54
}
// namespace experimental
55
}
// namespace grpc_event_engine
56
57
#endif // GRPC_EVENT_ENGINE_MEMORY_REQUEST_H
grpc_event_engine::experimental::MemoryRequest::max_
size_t max_
Definition:
memory_request.h:51
grpc_event_engine::experimental::MemoryRequest::max_allowed_size
static constexpr size_t max_allowed_size()
Maximum allowable request size - hard coded to 1GB.
Definition:
memory_request.h:38
grpc_event_engine::experimental::MemoryRequest::MemoryRequest
MemoryRequest(size_t n)
Request a fixed amount of memory.
Definition:
memory_request.h:31
grpc_event_engine::experimental::MemoryRequest::max
size_t max() const
Definition:
memory_request.h:47
grpc_event_engine::experimental::MemoryRequest::Increase
MemoryRequest Increase(size_t amount) const
Definition:
memory_request.h:42
grpc_event_engine::experimental::MemoryRequest::MemoryRequest
MemoryRequest(size_t min, size_t max)
Definition:
memory_request.h:35
n
int n
Definition:
abseil-cpp/absl/container/btree_test.cc:1080
grpc_event_engine::experimental::MemoryRequest::min
size_t min() const
Definition:
memory_request.h:46
grpc_event_engine
Definition:
endpoint_config.h:24
grpc_event_engine::experimental::MemoryRequest::min_
size_t min_
Definition:
memory_request.h:50
grpc_event_engine::experimental::MemoryRequest
Reservation request - how much memory do we want to allocate?
Definition:
memory_request.h:27
port_platform.h
grpc
Author(s):
autogenerated on Thu Mar 13 2025 03:00:35