aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/core/lib/slice/slice_internal.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/core/lib/slice/slice_internal.h')
-rw-r--r--src/core/lib/slice/slice_internal.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/core/lib/slice/slice_internal.h b/src/core/lib/slice/slice_internal.h
index 5d3d26b67b..5b05951522 100644
--- a/src/core/lib/slice/slice_internal.h
+++ b/src/core/lib/slice/slice_internal.h
@@ -46,4 +46,9 @@ grpc_slice grpc_slice_maybe_static_intern(grpc_slice slice,
uint32_t grpc_static_slice_hash(grpc_slice s);
int grpc_static_slice_eq(grpc_slice a, grpc_slice b);
+// Returns the memory used by this slice, not counting the slice structure
+// itself. This means that inlined and slices from static strings will return
+// 0. All other slices will return the size of the allocated chars.
+size_t grpc_slice_memory_usage(grpc_slice s);
+
#endif /* GRPC_CORE_LIB_SLICE_SLICE_INTERNAL_H */