MCPcopy Create free account
hub / github.com/antirez/ds4 / dist_socket_buffer_bytes

Function dist_socket_buffer_bytes

ds4_distributed.c:710–722  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

708 * ========================================================================= */
709
710static int dist_socket_buffer_bytes(void) {
711 int mb = 128;
712 const char *env = getenv("DS4_DIST_SOCKET_BUFFER_MB");
713 if (env && env[0]) {
714 errno = 0;
715 char *end = NULL;
716 long v = strtol(env, &end, 10);
717 if (errno == 0 && end != env && *end == '\0' && v >= 0 && v <= 512) {
718 mb = (int)v;
719 }
720 }
721 return mb > 0 ? mb * 1024 * 1024 : 0;
722}
723
724static uint32_t dist_worker_prefetch_depth(void) {
725 uint32_t depth = 2;

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected