blob: e51722ca70aac3d0082d26848b3b6ced6d7f786b [file] [log] [blame]
Denys Vlasenkobbf17bb2017-07-22 02:25:47 +02001#include <stdio.h>
2#include <stdlib.h>
3#include <unistd.h>
4int main(int argc, char **argv)
5{
6 char buf[256];
7
8 int i = argv[1] ? atoi(argv[1]) : 999999;
9 while (--i > 0) {
10 sprintf(buf, "%d", i);
11 setenv("VAR", buf, 1);
12 }
13 printf("Check size of [heap] mapping:\n");
14 freopen("/proc/self/maps", "r", stdin);
15 while (fgets(buf, sizeof(buf), stdin))
16 fputs(buf, stdout);
17 return 0;
18}