google / tcmalloc
File Size

The distribution of size of files (measured in lines of code).

Intro
  • File size measurements show the distribution of size of files.
  • Files are classified in four categories based on their size (lines of code): 1-100 (very small files), 101-200 (small files), 201-500 (medium size files), 501-1000 (long files), 1001+(very long files).
  • It is a good practice to keep files small. Long files may become "bloaters", code that have increased to such gargantuan proportions that they are hard to work with.
Learn more...
File Size Overall
  • There are 168 files with 36,508 lines of code.
    • 5 very long files (15,026 lines of code)
    • 5 long files (3,004 lines of code)
    • 28 medium size files (9,268 lines of codeclsfd_ftr_w_mp_ins)
    • 35 small files (5,344 lines of code)
    • 95 very small files (3,866 lines of code)
41% | 8% | 25% | 14% | 10%
Legend:
1001+
501-1000
201-500
101-200
1-100


explore: zoomable circles | sunburst | 3D view
File Size per Extension
1001+
501-1000
201-500
101-200
1-100
cc51% | 8% | 22% | 11% | 7%
h28% | 4% | 30% | 18% | 17%
S0% | 55% | 41% | 0% | 3%
proto0% | 0% | 0% | 100% | 0%
bzl0% | 0% | 0% | 82% | 17%
File Size per Logical Decomposition
primary
1001+
501-1000
201-500
101-200
1-100
tcmalloc/testing85% | 4% | 5% | 2% | 2%
tcmalloc23% | 9% | 36% | 17% | 12%
tcmalloc/internal16% | 9% | 28% | 27% | 18%
Longest Files (Top 50)
File# lines# units
empirical_distributions.cc
in tcmalloc/testing
9558 10
tcmalloc.cc
in tcmalloc
1978 51
huge_page_filler.h
in tcmalloc
1451 87
percpu_tcmalloc.h
in tcmalloc/internal
1025 35
cpu_cache.h
in tcmalloc
1014 37
size_classes.cc
in tcmalloc
670 -
experimental_pow2_below64_size_class.cc
in tcmalloc
638 -
S
percpu_rseq_aarch64.S
in tcmalloc/internal
593 -
transfer_cache_internals.h
in tcmalloc
586 33
empirical_driver.cc
in tcmalloc/testing
517 27
huge_page_aware_allocator.cc
in tcmalloc
467 23
system-alloc.cc
in tcmalloc
456 19
stats.cc
in tcmalloc
446 22
guarded_page_allocator.cc
in tcmalloc
443 30
S
percpu_rseq_x86_64.S
in tcmalloc/internal
438 -
malloc_extension.cc
in tcmalloc
414 39
huge_region.h
in tcmalloc
394 33
page_heap.cc
in tcmalloc
377 14
range_tracker.h
in tcmalloc/internal
373 32
profile_builder.cc
in tcmalloc/internal
364 9
huge_cache.cc
in tcmalloc
343 19
mock_transfer_cache.h
in tcmalloc
332 34
tcmalloc_benchmark.cc
in tcmalloc/testing
330 14
range_tracker_benchmark.cc
in tcmalloc/internal
328 16
transfer_cache.h
in tcmalloc
326 40
span.h
in tcmalloc
319 24
common.h
in tcmalloc
317 18
lifetime_based_allocator.h
in tcmalloc
311 28
thread_cache.cc
in tcmalloc
287 15
pagemap.h
in tcmalloc
286 22
huge_address_map.cc
in tcmalloc
283 12
central_freelist.h
in tcmalloc
261 16
huge_pages.h
in tcmalloc
245 31
empirical.cc
in tcmalloc/testing
243 17
percpu.h
in tcmalloc/internal
237 17
common.cc
in tcmalloc
221 5
pages.h
in tcmalloc
221 18
malloc_extension.h
in tcmalloc
206 1
proto
profile.proto
in tcmalloc/internal
200 -
experimental_pow2_size_class.cc
in tcmalloc
198 -
variants.bzl
in tcmalloc
197 -
logging.cc
in tcmalloc/internal
196 12
span.cc
in tcmalloc
195 9
page_allocator.h
in tcmalloc
194 11
lifetime_based_allocator.cc
in tcmalloc
191 9
parameters.cc
in tcmalloc
188 31
thread_cache.h
in tcmalloc
183 13
lifetime_predictions.h
in tcmalloc/internal
178 13
percpu.cc
in tcmalloc/internal
178 12
stats.h
in tcmalloc
178 12
Files With Most Units (Top 20)
File# lines# units
huge_page_filler.h
in tcmalloc
1451 87
tcmalloc.cc
in tcmalloc
1978 51
transfer_cache.h
in tcmalloc
326 40
malloc_extension.cc
in tcmalloc
414 39
cpu_cache.h
in tcmalloc
1014 37
percpu_tcmalloc.h
in tcmalloc/internal
1025 35
mock_transfer_cache.h
in tcmalloc
332 34
huge_region.h
in tcmalloc
394 33
transfer_cache_internals.h
in tcmalloc
586 33
range_tracker.h
in tcmalloc/internal
373 32
huge_pages.h
in tcmalloc
245 31
parameters.cc
in tcmalloc
188 31
guarded_page_allocator.cc
in tcmalloc
443 30
lifetime_based_allocator.h
in tcmalloc
311 28
tcmalloc_policy.h
in tcmalloc
170 27
empirical_driver.cc
in tcmalloc/testing
517 27
span.h
in tcmalloc
319 24
huge_page_aware_allocator.cc
in tcmalloc
467 23
linked_list.h
in tcmalloc/internal
175 23
pagemap.h
in tcmalloc
286 22
Files With Long Lines (Top 0)

There are 0 files with lines longer than 120 characters. In total, there are 0 long lines.

File# lines# units# long lines