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

Function init_opt_stats_print_opts

deps/jemalloc/src/jemalloc.c:753–776  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

751}
752
753static void
754init_opt_stats_print_opts(const char *v, size_t vlen) {
755 size_t opts_len = strlen(opt_stats_print_opts);
756 assert(opts_len <= stats_print_tot_num_options);
757
758 for (size_t i = 0; i < vlen; i++) {
759 switch (v[i]) {
760#define OPTION(o, v, d, s) case o: break;
761 STATS_PRINT_OPTIONS
762#undef OPTION
763 default: continue;
764 }
765
766 if (strchr(opt_stats_print_opts, v[i]) != NULL) {
767 /* Ignore repeated. */
768 continue;
769 }
770
771 opt_stats_print_opts[opts_len++] = v[i];
772 opt_stats_print_opts[opts_len] = '\0';
773 assert(opts_len <= stats_print_tot_num_options);
774 }
775 assert(opts_len == strlen(opt_stats_print_opts));
776}
777
778/* Reads the next size pair in a multi-sized option. */
779static bool

Callers 1

malloc_conf_init_helperFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected