[ create a new paste ] login | about

Project: example
Link: http://example.codepad.org/DabqUY50    [ raw code | output | fork ]

C, pasted on Jan 25:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
#include <stdio.h>
#include <stdlib.h>

int main(void ) {

int i;
char *p;
#define SZ 1024*1024 * 3
for (i=0; i<100; i++) {
p = malloc(SZ);
memset(p, 'A', SZ);
printf("hi %d\n", i);
}

 return 0;
}


Output:
1
Segmentation fault


Create a new paste based on this one


Comments: