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

Function test_heap

3rd/mimalloc-2.0.9/test/main.c:5–12  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

3#include <mimalloc.h>
4
5void test_heap(void* p_out) {
6 mi_heap_t* heap = mi_heap_new();
7 void* p1 = mi_heap_malloc(heap,32);
8 void* p2 = mi_heap_malloc(heap,48);
9 mi_free(p_out);
10 mi_heap_destroy(heap);
11 //mi_heap_delete(heap); mi_free(p1); mi_free(p2);
12}
13
14void test_large() {
15 const size_t N = 1000;

Callers 1

mainFunction · 0.85

Calls 4

mi_heap_newFunction · 0.85
mi_heap_mallocFunction · 0.85
mi_freeFunction · 0.85
mi_heap_destroyFunction · 0.85

Tested by

no test coverage detected