MCPcopy Create free account
hub / github.com/CppCXY/EmmyLuaCodeStyle / free_items

Function free_items

3rd/mimalloc-2.0.9/test/test-stress.c:110–122  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

108}
109
110static void free_items(void* p) {
111 if (p != NULL) {
112 uintptr_t* q = (uintptr_t*)p;
113 uintptr_t items = (q[0] ^ cookie);
114 for (uintptr_t i = 0; i < items; i++) {
115 if ((q[i] ^ cookie) != items - i) {
116 fprintf(stderr, "memory corruption at block %p at %zu\n", p, i);
117 abort();
118 }
119 }
120 }
121 custom_free(p);
122}
123
124
125static void stress(intptr_t tid) {

Callers 3

stressFunction · 0.85
test_stressFunction · 0.85
leakFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected