MCPcopy Create free account
hub / github.com/devosoft/avida / Dump

Method Dump

libs/tcmalloc-1.4/src/common.cc:200–215  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

198}
199
200void SizeMap::Dump(TCMalloc_Printer* out) {
201 // Dump class sizes and maximum external wastage per size class
202 for (size_t cl = 1; cl < kNumClasses; ++cl) {
203 const int alloc_size = class_to_pages_[cl] << kPageShift;
204 const int alloc_objs = alloc_size / class_to_size_[cl];
205 const int min_used = (class_to_size_[cl-1] + 1) * alloc_objs;
206 const int max_waste = alloc_size - min_used;
207 out->printf("SC %3d [ %8d .. %8d ] from %8d ; %2.0f%% maxwaste\n",
208 int(cl),
209 int(class_to_size_[cl-1] + 1),
210 int(class_to_size_[cl]),
211 int(class_to_pages_[cl] << kPageShift),
212 max_waste * 100.0 / alloc_size
213 );
214 }
215}
216
217// Metadata allocator -- keeps stats about how many bytes allocated.
218static uint64_t metadata_system_bytes_ = 0;

Callers 1

DumpStatsFunction · 0.45

Calls 1

printfMethod · 0.80

Tested by

no test coverage detected