g++ main.c -o main -Llib -ljemalloc -ldl -lpthread
#include <stdio.h>
#include <stdlib.h>
#include "include/jemalloc/jemalloc.h"
typedef struct T1
{
char c[4];
} T1;
void print_my_jemalloc_data(void *opaque, const char *buf);
int main()
{
//for (int i=0; i<50; ++i)
//{
// void* v = malloc(sizeof(T1));
//}
void* v = malloc(sizeof(T1));
malloc_stats_print(NULL, NULL, NULL);
return 0;
}
void print_my_jemalloc_data(void *opaque,const char *buf)
{
printf("%s", buf);
}