varch/test/test_valloc.c
2024-07-30 00:57:01 +08:00

22 lines
484 B
C

#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "init.h"
#include "valloc.h"
static void test(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());
}
init_export_app(test);