ref: 57fd86ea77bab85e988d003883dc323e2190d6b7
parent: 58b406cf181a732417b57119b9da46836a2b3ada
author: Roberto E. Vargas Caballero <k0ga@shike2.com>
date: Mon Oct 15 09:30:07 EDT 2018
[lib/c] Allocate buffers in stdio by demand Don't allocate buffers for FILEs before they are used.
--- a/lib/c/stdio.c
+++ b/lib/c/stdio.c
@@ -3,21 +3,11 @@
FILE __iob[FOPEN_MAX] = {
{
.fd = 0,
- .buf = NULL,
- .len = BUFSIZ,
.flags = _IOREAD,
- .lp = inbuf,
- .rp = inbuf,
- .wp = inbuf,
},
{
.fd = 1,
- .buf = NULL,
- .len = BUFSIZ,
.flags = _IOWRITE | _IOLBF,
- .lp = outbuf,
- .rp = outbuf,
- .wp = outbuf,
},
{
.fd = 2,