MCPcopy Create free account
hub / github.com/beefytech/Beef / SampleAllocation

Method SampleAllocation

BeefRT/gperftools/src/sampler.h:140–148  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

138};
139
140inline bool Sampler::SampleAllocation(size_t k) {
141 if (bytes_until_sample_ < k) {
142 bytes_until_sample_ = PickNextSamplingPoint();
143 return true;
144 } else {
145 bytes_until_sample_ -= k;
146 return false;
147 }
148}
149
150// Inline functions which are public for testing purposes
151

Callers 6

do_malloc_pagesFunction · 0.45
do_malloc_smallFunction · 0.45
BF_do_malloc_pagesFunction · 0.45
BF_do_malloc_smallFunction · 0.45
BF_do_malloc_pagesFunction · 0.45
BF_do_malloc_smallFunction · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected