yuezonghe | 824eb0c | 2024-06-27 02:32:26 -0700 | [diff] [blame] | 1 | #include <stdlib.h> |
2 | #include <stdio.h> | ||||
3 | |||||
4 | int main(int argc, char **argv) | ||||
5 | { | ||||
6 | void *ptr = NULL; | ||||
7 | ptr = realloc(ptr, 0); | ||||
8 | printf("realloc(NULL, 0) -- pointer = %p\n", ptr); | ||||
9 | |||||
10 | ptr = malloc(0); | ||||
11 | printf("malloc(0) -- pointer = %p\n", ptr); | ||||
12 | return 0; | ||||
13 | } |