MCPcopy Create free account
hub / github.com/Snapchat/KeyDB / init_opt_stats_print_opts

Function init_opt_stats_print_opts

deps/memkind/src/jemalloc/src/jemalloc.c:738–761  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

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

Callers 1

malloc_conf_initFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected