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

Function check_debug_fill_uninit

3rd/mimalloc-2.0.9/test/test-api-fill.c:311–325  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

309
310#if MI_DEBUG >= 2
311bool check_debug_fill_uninit(uint8_t* p, size_t size) {
312#if MI_VALGRIND
313 (void)p; (void)size;
314 return true; // when compiled with valgrind we don't init on purpose
315#else
316 if(!p)
317 return false;
318
319 bool result = true;
320 for (size_t i = 0; i < size; ++i) {
321 result &= p[i] == MI_DEBUG_UNINIT;
322 }
323 return result;
324#endif
325}
326
327bool check_debug_fill_freed(uint8_t* p, size_t size) {
328#if MI_VALGRIND

Callers 1

mainFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected