#include <stdlib.h>
struct l {
struct l *next;
int data;
} *root = 0;
void free_l(struct l *p) {
if (p->next)
free_l(p->next);
}
#define N 10000000
int main(int argc, char **argv) {
unsigned long i;
for (i = 0; i < N; i++) {
struct l
*p
= malloc(sizeof(struct l
)); p->next = root;
root = p;
}
if (argc == 2) {
struct l *p = root, *q;
while (p) {
q = p->next;
p = q;
}
} else if (argc ==1) {
free_l(root);
}
return 0;
}
/* end */
I2luY2x1ZGUgPHN0ZGxpYi5oPgpzdHJ1Y3QgbCB7CiAgc3RydWN0IGwgKm5leHQ7CiAgaW50IGRhdGE7Cn0gKnJvb3QgPSAwOwoKdm9pZCBmcmVlX2woc3RydWN0IGwgKnApIHsKICBpZiAocC0+bmV4dCkKICAgIGZyZWVfbChwLT5uZXh0KTsKICBmcmVlKHApOwp9CgojZGVmaW5lIE4gMTAwMDAwMDAKaW50IG1haW4oaW50IGFyZ2MsIGNoYXIgKiphcmd2KSB7CiAgdW5zaWduZWQgbG9uZyBpOwogIGZvciAoaSA9IDA7IGkgPCBOOyBpKyspIHsKICAgIHN0cnVjdCBsICpwID0gbWFsbG9jKHNpemVvZihzdHJ1Y3QgbCkpOwogICAgcC0+bmV4dCA9IHJvb3Q7CiAgICByb290ID0gcDsKICB9CiAgaWYgKGFyZ2MgPT0gMikgewogICAgc3RydWN0IGwgKnAgPSByb290LCAqcTsKICAgIHdoaWxlIChwKSB7CiAgICAgIHEgPSBwLT5uZXh0OwogICAgICBmcmVlKHApOwogICAgICBwID0gcTsKICAgIH0KICB9IGVsc2UgaWYgKGFyZ2MgPT0xKSB7CiAgICBmcmVlX2wocm9vdCk7CiAgfQogIHJldHVybiAwOwp9Ci8qIGVuZCAqLwo=