2016-01-12 15:51:11 +00:00
|
|
|
#include <stdio.h>
|
|
|
|
#include <stdlib.h>
|
2016-01-15 12:31:28 +00:00
|
|
|
#include <unistd.h>
|
|
|
|
#include <string.h>
|
2016-01-12 15:51:11 +00:00
|
|
|
int main(int argc, char *argv[]) {
|
2016-01-12 11:10:22 +00:00
|
|
|
int *a = NULL;
|
2016-01-15 12:31:28 +00:00
|
|
|
int j;
|
|
|
|
printf("start\n");
|
2016-01-12 11:10:22 +00:00
|
|
|
// 150M
|
|
|
|
int v = 150000000;
|
2016-01-15 12:31:28 +00:00
|
|
|
//fork();
|
|
|
|
// printf("%s\n", getenv("LD_PRELOAD"));
|
|
|
|
for (j = 0; j < argc; j++)
|
2016-01-12 15:51:11 +00:00
|
|
|
printf("argv[%d]: %s\n", j, argv[j]);
|
2016-01-12 11:22:18 +00:00
|
|
|
a = (int *) malloc(v);
|
|
|
|
if (a == NULL) {
|
2016-01-12 11:10:22 +00:00
|
|
|
printf("error\n");
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
memset(a, 0, v);
|
|
|
|
printf("success\n");
|
|
|
|
}
|
2016-01-15 12:31:28 +00:00
|
|
|
printf("end\n");
|
2016-01-15 17:26:40 +00:00
|
|
|
return 0;
|
2016-01-12 11:10:22 +00:00
|
|
|
}
|