Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/dotnet/runtime.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohan Lorensson <lateralusx.github@gmail.com>2021-01-14 20:45:13 +0300
committerGitHub <noreply@github.com>2021-01-14 20:45:13 +0300
commitde5f1bd4a6326acfd7376ce3f07aad8267c831e9 (patch)
tree492a902b4a0f67b4d6d8e373883b677ae746a7bf /src/native
parent1f736c151de09da58cf1b5f147e6d750778bad69 (diff)
Prealloc 16 ipc slots in poll handle array. (#46981)
Diffstat (limited to 'src/native')
-rw-r--r--src/native/eventpipe/ds-ipc.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/native/eventpipe/ds-ipc.c b/src/native/eventpipe/ds-ipc.c
index 1aa2fbd547e..86f85342a9f 100644
--- a/src/native/eventpipe/ds-ipc.c
+++ b/src/native/eventpipe/ds-ipc.c
@@ -20,6 +20,8 @@ static ds_rt_port_array_t _ds_port_array = { 0 };
// allows us to track which connections have sent their ResumeRuntime commands
static DiagnosticsPort *_ds_current_port = NULL;
+static const uint32_t _ds_default_poll_handle_array_size = 16;
+
static
inline
bool
@@ -339,7 +341,7 @@ ds_ipc_stream_factory_get_next_available_stream (ds_ipc_error_callback_func call
DS_RT_DECLARE_LOCAL_IPC_POLL_HANDLE_ARRAY (ipc_poll_handles);
- ds_rt_ipc_poll_handle_array_init (&ipc_poll_handles);
+ ds_rt_ipc_poll_handle_array_init_capacity (&ipc_poll_handles, _ds_default_poll_handle_array_size);
ep_raise_error_if_nok (ds_rt_ipc_poll_handle_array_is_valid (&ipc_poll_handles));
while (!stream) {