Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // Basic test
- #include <stdio.h>
- #include <malloc.h>
- int main(){
- char *a, *b, *c;
- int i = 0 ;
- a = malloc(5);
- for (i = 0 ; i < 10; i++){
- b = malloc(1); // Seg fault occurs here
- }
- free(a);
- free(b);
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement