Browse Source

static printf buffer

don't waste stack memory.
When multitasking, this will have to change though
master
Mathieu Serandour 10 months ago
parent
commit
8d47304042
  1. 5
      kernel/lib/sprintf.c

5
kernel/lib/sprintf.c

@ -224,8 +224,9 @@ int printf(const char* format, ...) {
}
int vprintf(const char* format, va_list ap) {
char buf[1024];
// static buffer: don't waste 1K
// in stack memory
static char buf[1024];
int ret = vsprintf(buf, format, ap);

Loading…
Cancel
Save