Revert arena size fix

pull/15524/head
Juanli Shen 7 years ago
parent 40494bbe89
commit 226a3d2ff6
  1. 8
      src/core/lib/surface/call.cc
  2. 5
      src/core/lib/surface/call.h
  3. 3
      src/core/lib/surface/channel.cc

@ -67,9 +67,6 @@
#define MAX_SEND_EXTRA_METADATA_COUNT 3 #define MAX_SEND_EXTRA_METADATA_COUNT 3
// Used to create arena for the first call.
#define ESTIMATED_MDELEM_COUNT 16
/* Status data for a request can come from several sources; this /* Status data for a request can come from several sources; this
enumerates them all, and acts as a priority sorting for which enumerates them all, and acts as a priority sorting for which
status to return to the application - earlier entries override status to return to the application - earlier entries override
@ -326,11 +323,6 @@ static parent_call* get_parent_call(grpc_call* call) {
return (parent_call*)gpr_atm_acq_load(&call->parent_call_atm); return (parent_call*)gpr_atm_acq_load(&call->parent_call_atm);
} }
size_t grpc_call_get_initial_size_estimate() {
return sizeof(grpc_call) + sizeof(batch_control) * MAX_CONCURRENT_BATCHES +
sizeof(grpc_linked_mdelem) * ESTIMATED_MDELEM_COUNT;
}
grpc_error* grpc_call_create(const grpc_call_create_args* args, grpc_error* grpc_call_create(const grpc_call_create_args* args,
grpc_call** out_call) { grpc_call** out_call) {
GPR_TIMER_SCOPE("grpc_call_create", 0); GPR_TIMER_SCOPE("grpc_call_create", 0);

@ -98,11 +98,6 @@ void* grpc_call_context_get(grpc_call* call, grpc_context_index elem);
uint8_t grpc_call_is_client(grpc_call* call); uint8_t grpc_call_is_client(grpc_call* call);
/* Get the estimated memory size for a call BESIDES the call stack. Combined
* with the size of the call stack, it helps estimate the arena size for the
* initial call. */
size_t grpc_call_get_initial_size_estimate();
/* Return an appropriate compression algorithm for the requested compression \a /* Return an appropriate compression algorithm for the requested compression \a
* level in the context of \a call. */ * level in the context of \a call. */
grpc_compression_algorithm grpc_call_compression_for_level( grpc_compression_algorithm grpc_call_compression_for_level(

@ -108,8 +108,7 @@ grpc_channel* grpc_channel_create_with_builder(
gpr_atm_no_barrier_store( gpr_atm_no_barrier_store(
&channel->call_size_estimate, &channel->call_size_estimate,
(gpr_atm)CHANNEL_STACK_FROM_CHANNEL(channel)->call_stack_size + (gpr_atm)CHANNEL_STACK_FROM_CHANNEL(channel)->call_stack_size);
grpc_call_get_initial_size_estimate());
grpc_compression_options_init(&channel->compression_options); grpc_compression_options_init(&channel->compression_options);
for (size_t i = 0; i < args->num_args; i++) { for (size_t i = 0; i < args->num_args; i++) {

Loading…
Cancel
Save