MCPcopy Create free account
hub / github.com/apache/cloudberry / alloc_socket_set

Function alloc_socket_set

src/bin/pgbench/pgbench.c:7035–7045  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

7033#ifdef POLL_USING_PPOLL
7034
7035static socket_set *
7036alloc_socket_set(int count)
7037{
7038 socket_set *sa;
7039
7040 sa = (socket_set *) pg_malloc0(offsetof(socket_set, pollfds) +
7041 sizeof(struct pollfd) * count);
7042 sa->maxfds = count;
7043 sa->curfds = 0;
7044 return sa;
7045}
7046
7047static void
7048free_socket_set(socket_set *sa)

Callers 1

threadRunFunction · 0.85

Calls 1

pg_malloc0Function · 0.85

Tested by

no test coverage detected