A
Size: a a a
A
A
VV
DL
DL
A
DL
A
A
void my_free(int **x) {
printf("Freeing %p\n", *x);
free(*x);
}
int main() {
int *x __attribute__((cleanup(my_free)));
x = malloc(1000);
printf("Allocated 1000 bytes at %p\n", x);
}
A
A
$ ./my
Allocated 1000 bytes at 0x563bcb9862a0
Freeing 0x563bcb9862a0
A
ND
A
A
A
VV
А
VV