Lines Matching defs:counts
1942 size_t counts[UPB_MAXARRSIZE + 1] = {0};
1957 counts[bucket]++;
1964 for (size_lg2 = ARRAY_SIZE(counts) - 1; size_lg2 > 0; size_lg2--) {
1965 if (counts[size_lg2] == 0) {
1972 arr_count -= counts[size_lg2];
4658 decl_counts *counts) {
4662 counts->msg_count++;
4666 count_types_in_msg(msgs[i], counts);
4670 counts->enum_count += n;
4673 counts->ext_count += n;
4678 decl_counts *counts) {
4684 count_types_in_msg(msgs[i], counts);
4688 counts->enum_count += n;
4691 counts->ext_count += n;
4773 decl_counts counts = {0};
4775 count_types_in_file(file_proto, &counts);
4777 file->msgs = upb_malloc(alloc, sizeof(*file->msgs) * counts.msg_count);
4778 file->enums = upb_malloc(alloc, sizeof(*file->enums) * counts.enum_count);
4779 file->exts = upb_malloc(alloc, sizeof(*file->exts) * counts.ext_count);
4781 CHK_OOM(counts.msg_count == 0 || file->msgs);
4782 CHK_OOM(counts.enum_count == 0 || file->enums);
4783 CHK_OOM(counts.ext_count == 0 || file->exts);
12423 * Why max_depth * 2? UPB_MAX_HANDLER_DEPTH counts depth as nested messages.