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

Function prof_recent_alloc_assert_count

BeefRT/JEMalloc/src/prof_recent.c:262–276  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

260}
261
262static void
263prof_recent_alloc_assert_count(tsd_t *tsd) {
264 malloc_mutex_assert_owner(tsd_tsdn(tsd), &prof_recent_alloc_mtx);
265 if (!config_debug) {
266 return;
267 }
268 ssize_t count = 0;
269 prof_recent_t *n;
270 ql_foreach(n, &prof_recent_alloc_list, link) {
271 ++count;
272 }
273 assert(count == prof_recent_alloc_count);
274 assert(prof_recent_alloc_max_get(tsd) == -1 ||
275 count <= prof_recent_alloc_max_get(tsd));
276}
277
278void
279prof_recent_alloc(tsd_t *tsd, edata_t *edata, size_t size, size_t usize) {

Callers 4

prof_recent_allocFunction · 0.85
prof_recent_alloc_dumpFunction · 0.85

Calls 4

tsd_tsdnFunction · 0.85
ql_foreachFunction · 0.85

Tested by

no test coverage detected