2022-02-17 21:33:21 -05:00
|
|
|
#include <stdio.h>
|
2022-02-19 12:01:56 -05:00
|
|
|
#include <stdlib.h>
|
2022-02-16 12:25:14 -05:00
|
|
|
|
2022-02-17 21:33:21 -05:00
|
|
|
int main(int argc, char **argv) {
|
2022-02-19 12:01:56 -05:00
|
|
|
printf("%p\n", malloc(1024*16));
|
|
|
|
int *list = malloc(1024*4);
|
|
|
|
printf("%p \n",list);
|
|
|
|
list[1023] = 77;
|
|
|
|
list = realloc(list, 1024*64);
|
|
|
|
printf("%p \n",list);
|
|
|
|
printf("%d\n",list[1023]);
|
|
|
|
free(list);
|
2022-02-17 21:33:21 -05:00
|
|
|
return 0;
|
2022-02-09 22:44:27 -05:00
|
|
|
}
|
2022-02-12 21:27:57 -05:00
|
|
|
|