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

Function various_tests

3rd/mimalloc-2.0.9/test/main-override.cpp:83–102  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

81
82
83static void various_tests() {
84 atexit(free_p);
85 void* p1 = malloc(78);
86 void* p2 = mi_malloc_aligned(24, 16);
87 free(p1);
88 p1 = malloc(8);
89 char* s = mi_strdup("hello\n");
90
91 mi_free(p2);
92 p2 = malloc(16);
93 p1 = realloc(p1, 32);
94 free(p1);
95 free(p2);
96 mi_free(s);
97
98 Test* t = new Test(42);
99 delete t;
100 t = new (std::nothrow) Test(42);
101 delete t;
102}
103
104class Static {
105private:

Callers

nothing calls this directly

Calls 3

mi_malloc_alignedFunction · 0.85
mi_strdupFunction · 0.85
mi_freeFunction · 0.85

Tested by

no test coverage detected