diff options
author | 2016-10-24 13:21:39 -0700 | |
---|---|---|
committer | 2016-10-24 13:21:39 -0700 | |
commit | b38bfc00bf53d6a42f9d3a15e4eb33be7e37c8b6 (patch) | |
tree | 6fadafe81d89368a44ca8cdb512951064f213b01 /src/core/lib/iomgr/resource_quota.h | |
parent | c7f1a6d5fc36141f69864151bc97f48b6a7ac58a (diff) |
Make bdp estimation memory pressure aware
Diffstat (limited to 'src/core/lib/iomgr/resource_quota.h')
-rw-r--r-- | src/core/lib/iomgr/resource_quota.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/core/lib/iomgr/resource_quota.h b/src/core/lib/iomgr/resource_quota.h index af94a19911..d9e7d8fa90 100644 --- a/src/core/lib/iomgr/resource_quota.h +++ b/src/core/lib/iomgr/resource_quota.h @@ -78,6 +78,12 @@ void grpc_resource_quota_internal_unref(grpc_exec_ctx *exec_ctx, grpc_resource_quota *grpc_resource_quota_from_channel_args( const grpc_channel_args *channel_args); +/* Return a number indicating current memory pressure: + 0.0 ==> no memory usage + 1.0 ==> maximum memory usage */ +double grpc_resource_quota_get_memory_pressure( + grpc_resource_quota *resource_quota); + /* Resource users are kept in (potentially) several intrusive linked lists at once. These are the list names. */ typedef enum { |