#include "test.h" #include #include #include #include "valloc.h" void test_main(void) { void* p = NULL; printf("malloc %p\r\n", malloc(0)); p = realloc(NULL, 100); p = malloc(64); p = malloc(50); printf("realloc %p\r\n", realloc(NULL, 0)); printf("%d\r\n", *(int *)p); free(p); v_check_unfree(); printf("count = %d\r\n", v_check_count()); printf("used = %d\r\n", v_check_used()); } std_return test_init(void) { test_main(); return E_OK; }