void test()
{
const size_t Gbyte = 1024 * 1024 * 1024;
size_t i;
char *Pointers[3];
// Allocate
for (i = 0; i != 3; ++i)
Pointers
[i
] = (char *)malloc(Gbyte
); // Use
for (i = 0; i != 3; ++i)
Pointers[i][0] = 1;
// Free
for (i = 0; i != 3; ++i)
}
dm9pZCB0ZXN0KCkKewogIGNvbnN0IHNpemVfdCBHYnl0ZSA9IDEwMjQgKiAxMDI0ICogMTAyNDsKICBzaXplX3QgaTsKICBjaGFyICpQb2ludGVyc1szXTsKICAvLyBBbGxvY2F0ZQogIGZvciAoaSA9IDA7IGkgIT0gMzsgKytpKQogICAgUG9pbnRlcnNbaV0gPSAoY2hhciAqKW1hbGxvYyhHYnl0ZSk7CiAgLy8gVXNlCiAgZm9yIChpID0gMDsgaSAhPSAzOyArK2kpCiAgICBQb2ludGVyc1tpXVswXSA9IDE7CiAgLy8gRnJlZQogIGZvciAoaSA9IDA7IGkgIT0gMzsgKytpKQogICAgZnJlZShQb2ludGVyc1tpXSk7Cn0=
prog.c: In function 'test':
prog.c:3:9: error: unknown type name 'size_t'
const size_t Gbyte = 1024 * 1024 * 1024;
^
prog.c:4:3: error: unknown type name 'size_t'
size_t i;
^
prog.c:8:5: warning: implicit declaration of function 'malloc' [-Wimplicit-function-declaration]
Pointers[i] = (char *)malloc(Gbyte);
^
prog.c:8:27: warning: incompatible implicit declaration of built-in function 'malloc'
Pointers[i] = (char *)malloc(Gbyte);
^
prog.c:14:5: warning: implicit declaration of function 'free' [-Wimplicit-function-declaration]
free(Pointers[i]);
^
prog.c:14:5: warning: incompatible implicit declaration of built-in function 'free'