MCPcopy Create free account
hub / github.com/bloomberg/comdb2 / reset_on_error

Function reset_on_error

dlmalloc/dlmalloc.c:3298–3311  ·  view source on GitHub ↗

default corruption action */

Source from the content-addressed store, hash-verified

3296
3297/* default corruption action */
3298static void reset_on_error(mstate m) {
3299 int i;
3300 ++malloc_corruption_error_count;
3301 /* Reinitialize fields to forget about all memory */
3302 m->smallbins = m->treebins = 0;
3303 m->dvsize = m->topsize = 0;
3304 m->seg.base = 0;
3305 m->seg.size = 0;
3306 m->seg.next = 0;
3307 m->top = m->dv = 0;
3308 for (i = 0; i < NTREEBINS; ++i)
3309 *treebin_at(m, i) = 0;
3310 init_bins(m);
3311}
3312#endif /* PROCEED_ON_ERROR */
3313
3314/* Allocate chunk and prepend remainder with chunk in successor base. */

Callers

nothing calls this directly

Calls 1

init_binsFunction · 0.85

Tested by

no test coverage detected