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

Function batch_alloc_prof_sample_assert

BeefRT/JEMalloc/src/jemalloc.c:4118–4129  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

4116#endif
4117
4118static void
4119batch_alloc_prof_sample_assert(tsd_t *tsd, size_t batch, size_t usize) {
4120 assert(config_prof && opt_prof);
4121 bool prof_sample_event = te_prof_sample_event_lookahead(tsd,
4122 batch * usize);
4123 assert(!prof_sample_event);
4124 size_t surplus;
4125 prof_sample_event = te_prof_sample_event_lookahead_surplus(tsd,
4126 (batch + 1) * usize, &surplus);
4127 assert(prof_sample_event);
4128 assert(surplus < usize);
4129}
4130
4131size_t
4132batch_alloc(void **ptrs, size_t num, size_t size, int flags) {

Callers 1

batch_allocFunction · 0.85

Tested by

no test coverage detected