Skip to content

Instantly share code, notes, and snippets.

@antirez
Created March 28, 2010 17:53
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save antirez/346913 to your computer and use it in GitHub Desktop.
Save antirez/346913 to your computer and use it in GitHub Desktop.
#include <stdio.h>
#include <stdlib.h>
int main(void) {
char *a = malloc(32);
char *b = malloc(45);
printf("a: %p\n", a);
free(a);
printf("b: %p\n", b);
b = realloc(b,32);
printf("b: %p\n", b);
return 0;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment