MCPcopy Create free account
hub / github.com/F-Stack/f-stack / init_opt_stats_print_opts

Function init_opt_stats_print_opts

app/redis-6.2.6/deps/jemalloc/src/jemalloc.c:739–762  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

737}
738
739static void
740init_opt_stats_print_opts(const char *v, size_t vlen) {
741 size_t opts_len = strlen(opt_stats_print_opts);
742 assert(opts_len <= stats_print_tot_num_options);
743
744 for (size_t i = 0; i < vlen; i++) {
745 switch (v[i]) {
746#define OPTION(o, v, d, s) case o: break;
747 STATS_PRINT_OPTIONS
748#undef OPTION
749 default: continue;
750 }
751
752 if (strchr(opt_stats_print_opts, v[i]) != NULL) {
753 /* Ignore repeated. */
754 continue;
755 }
756
757 opt_stats_print_opts[opts_len++] = v[i];
758 opt_stats_print_opts[opts_len] = '\0';
759 assert(opts_len <= stats_print_tot_num_options);
760 }
761 assert(opts_len == strlen(opt_stats_print_opts));
762}
763
764static bool
765malloc_conf_next(char const **opts_p, char const **k_p, size_t *klen_p,

Callers 1

malloc_conf_initFunction · 0.85

Calls 1

strchrFunction · 0.85

Tested by

no test coverage detected