yum install gdb -y
// demo 代码
#include <stdio.h>
#include <stdlib.h>
#include <malloc.h>
int main()
{
int *a = NULL;
a = (int *)malloc(sizeof(int));
*a = 255;
printf("%d", malloc_usable_size(a));
free(a);
return 0;
}
gcc test.c -o test -g
gdb ./test
strat
list
p