Skip to content

Commit

Permalink
setup alloc
Browse files Browse the repository at this point in the history
  • Loading branch information
xiazhvera committed Dec 10, 2024
1 parent 5ed58bd commit 4b89a0d
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 1 addition & 1 deletion source/darwin/dispatch_queue_event_loop.c
Original file line number Diff line number Diff line change
Expand Up @@ -214,14 +214,14 @@ struct aws_event_loop *aws_event_loop_new_with_dispatch_queue(

struct aws_event_loop *loop = aws_mem_calloc(alloc, 1, sizeof(struct aws_event_loop));
struct dispatch_loop *dispatch_loop = NULL;
dispatch_loop->allocator = alloc;

AWS_LOGF_DEBUG(AWS_LS_IO_EVENT_LOOP, "id=%p: Initializing dispatch_queue event-loop", (void *)loop);
if (aws_event_loop_init_base(loop, alloc, options->clock)) {
goto clean_up;
}

dispatch_loop = aws_mem_calloc(alloc, 1, sizeof(struct dispatch_loop));
dispatch_loop->allocator = alloc;

char dispatch_queue_id[AWS_IO_APPLE_DISPATCH_QUEUE_ID_LENGTH] = {0};
s_get_unique_dispatch_queue_id(dispatch_queue_id);
Expand Down
2 changes: 2 additions & 0 deletions source/darwin/nw_socket.c
Original file line number Diff line number Diff line change
Expand Up @@ -325,6 +325,7 @@ static void s_socket_impl_destroy(void *sock_ptr) {
nw_socket = NULL;
}

#ifdef AWS_ENABLE_DISPATCH_QUEUE
int aws_socket_init_apple_nw_socket(
struct aws_socket *socket,
struct aws_allocator *alloc,
Expand Down Expand Up @@ -375,6 +376,7 @@ int aws_socket_init_apple_nw_socket(

return AWS_OP_SUCCESS;
}
#endif

static void s_client_set_dispatch_queue(struct aws_io_handle *handle, void *queue) {
nw_connection_set_queue(handle->data.handle, queue);
Expand Down

0 comments on commit 4b89a0d

Please sign in to comment.