MCPcopy Create free account
hub / github.com/emscripten-core/emscripten / reset_on_error

Function reset_on_error

system/lib/dlmalloc.c:4004–4017  ·  view source on GitHub ↗

default corruption action */

Source from the content-addressed store, hash-verified

4002
4003/* default corruption action */
4004static void reset_on_error(mstate m) {
4005 int i;
4006 ++malloc_corruption_error_count;
4007 /* Reinitialize fields to forget about all memory */
4008 m->smallmap = m->treemap = 0;
4009 m->dvsize = m->topsize = 0;
4010 m->seg.base = 0;
4011 m->seg.size = 0;
4012 m->seg.next = 0;
4013 m->top = m->dv = 0;
4014 for (i = 0; i < NTREEBINS; ++i)
4015 *treebin_at(m, i) = 0;
4016 init_bins(m);
4017}
4018#endif /* PROCEED_ON_ERROR */
4019
4020/* 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