cosmopolitan/libc/stdio
Justine Tunney 80b211e314 Add raw memory visualization tool to redbean
This change introduces a `-W /dev/pts/1` flag to redbean. What it does
is use the mincore() system call to create a dual-screen terminal
display that lets you troubleshoot the virtual address space. This is
useful since page faults are an important thing to consider when using a
forking web server. Now we have a colorful visualization of which pages
are going to fault and which ones are resident in memory.

The memory monitor, if enabled, spawns as a thread that just outputs
ANSI codes to the second terminal in a loop. In order to make this
happen using the new clone() polyfill, stdio is now thread safe.

This change also introduces some new demo pages to redbean. It also
polishes the demos we already have, to look a bit nicer and more
presentable for the upcoming release, with better explanations too.
2022-05-14 04:33:58 -07:00
..
unlocked Add raw memory visualization tool to redbean 2022-05-14 04:33:58 -07:00
append.internal.h Add Linux ptrace() tutorial 2022-03-24 08:00:36 -07:00
appendd.c Restart CI for New Technology and UBSAN hunting 2022-03-21 04:32:57 -07:00
appendf.c Add function for creating hex string literals 2021-08-07 07:05:19 -07:00
appendr.c Improve synchronization 2022-04-15 15:31:55 -07:00
appends.c Add function for creating hex string literals 2021-08-07 07:05:19 -07:00
appendw.c Add function for creating hex string literals 2021-08-07 07:05:19 -07:00
appendz.c Add function for creating hex string literals 2021-08-07 07:05:19 -07:00
clearerr.c Add raw memory visualization tool to redbean 2022-05-14 04:33:58 -07:00
dirstream.c Fix bugs and make improvements 2022-04-20 10:05:34 -07:00
dtoa.c Make more fixes and improvements 2022-04-21 13:44:59 -07:00
dumphexc.c Add function for creating hex string literals 2021-08-07 07:05:19 -07:00
fbufsize.c Work towards improving signals and processes 2021-01-27 19:34:02 -08:00
fclose.c Add raw memory visualization tool to redbean 2022-05-14 04:33:58 -07:00
fclose_s.c Improve locks and signals 2022-04-12 05:20:17 -07:00
fdopen.c Make major improvements to stdio 2021-03-26 22:31:41 -07:00
feof.c Add raw memory visualization tool to redbean 2022-05-14 04:33:58 -07:00
ferror.c Add raw memory visualization tool to redbean 2022-05-14 04:33:58 -07:00
fflush.c Add raw memory visualization tool to redbean 2022-05-14 04:33:58 -07:00
fflush.internal.h Add raw memory visualization tool to redbean 2022-05-14 04:33:58 -07:00
fflushimpl.c Add /statusz page to redbean plus other enhancements 2021-04-23 18:53:57 -07:00
fgetc.c Add raw memory visualization tool to redbean 2022-05-14 04:33:58 -07:00
fgetln.c Improve isystem includes and magic numbers 2021-08-14 23:36:36 -07:00
fgetpos.c Change license 2020-12-27 17:18:44 -08:00
fgets.c Add raw memory visualization tool to redbean 2022-05-14 04:33:58 -07:00
fgetwc.c Add raw memory visualization tool to redbean 2022-05-14 04:33:58 -07:00
fgetws.c Add raw memory visualization tool to redbean 2022-05-14 04:33:58 -07:00
fileno.c Add raw memory visualization tool to redbean 2022-05-14 04:33:58 -07:00
flbf.c Work towards improving signals and processes 2021-01-27 19:34:02 -08:00
flockfile.c Add raw memory visualization tool to redbean 2022-05-14 04:33:58 -07:00
flushers.c Remove more nonstandard stuff from cosmopolitan.h 2021-03-01 00:18:23 -08:00
flushlbf.c Add raw memory visualization tool to redbean 2022-05-14 04:33:58 -07:00
fmemopen.c Make major improvements to stdio 2021-03-26 22:31:41 -07:00
fopen.c Add Linux ptrace() tutorial 2022-03-24 08:00:36 -07:00
fopenflags.c Fix issues with stdio needed for Lua 2021-03-06 19:04:26 -08:00
fpending.c Work towards improving signals and processes 2021-01-27 19:34:02 -08:00
fprintf.c Change license 2020-12-27 17:18:44 -08:00
fpurge.c Work towards improving signals and processes 2021-01-27 19:34:02 -08:00
fputc.c Add raw memory visualization tool to redbean 2022-05-14 04:33:58 -07:00
fputs.c Add raw memory visualization tool to redbean 2022-05-14 04:33:58 -07:00
fputwc.c Add raw memory visualization tool to redbean 2022-05-14 04:33:58 -07:00
fputws.c Add raw memory visualization tool to redbean 2022-05-14 04:33:58 -07:00
fread.c Add raw memory visualization tool to redbean 2022-05-14 04:33:58 -07:00
freadable.c Work towards improving signals and processes 2021-01-27 19:34:02 -08:00
freading.c Work towards improving signals and processes 2021-01-27 19:34:02 -08:00
freopen.c Add raw memory visualization tool to redbean 2022-05-14 04:33:58 -07:00
fscanf.c Change license 2020-12-27 17:18:44 -08:00
fseek.c Make major improvements to stdio 2021-03-26 22:31:41 -07:00
fseeko.c Add raw memory visualization tool to redbean 2022-05-14 04:33:58 -07:00
fsetlocking.c Add raw memory visualization tool to redbean 2022-05-14 04:33:58 -07:00
fsetpos.c Change license 2020-12-27 17:18:44 -08:00
ftell.c Make major improvements to stdio 2021-03-26 22:31:41 -07:00
ftello.c Add raw memory visualization tool to redbean 2022-05-14 04:33:58 -07:00
ftrylockfile.c Add raw memory visualization tool to redbean 2022-05-14 04:33:58 -07:00
funlockfile.c Add raw memory visualization tool to redbean 2022-05-14 04:33:58 -07:00
fwritable.c Work towards improving signals and processes 2021-01-27 19:34:02 -08:00
fwrite.c Add raw memory visualization tool to redbean 2022-05-14 04:33:58 -07:00
fwriting.c Work towards improving signals and processes 2021-01-27 19:34:02 -08:00
getc.c Add raw memory visualization tool to redbean 2022-05-14 04:33:58 -07:00
getchar.c Add raw memory visualization tool to redbean 2022-05-14 04:33:58 -07:00
getdelim.c Add raw memory visualization tool to redbean 2022-05-14 04:33:58 -07:00
getline.c Fix basename() and dirname() 2022-04-06 00:13:44 -07:00
gets.c Change license 2020-12-27 17:18:44 -08:00
getwc.c Add raw memory visualization tool to redbean 2022-05-14 04:33:58 -07:00
getwchar.c Add raw memory visualization tool to redbean 2022-05-14 04:33:58 -07:00
hex.internal.h Add function for creating hex string literals 2021-08-07 07:05:19 -07:00
internal.h Make numerous improvements 2021-09-28 01:52:34 -07:00
kappendf.c Add Linux ptrace() tutorial 2022-03-24 08:00:36 -07:00
kvappendf.c Add Linux ptrace() tutorial 2022-03-24 08:00:36 -07:00
mkostemp.c Change license 2020-12-27 17:18:44 -08:00
mkostemps.c Import C++ Standard Template Library 2022-03-22 06:41:54 -07:00
mkostempsm.c Polyfill SIGCHLD on the New Technology 2022-03-22 21:31:12 -07:00
mkstemp.c Change license 2020-12-27 17:18:44 -08:00
mkstemps.c Change license 2020-12-27 17:18:44 -08:00
mktemp.c Change license 2020-12-27 17:18:44 -08:00
pclose.c Work towards improving signals and processes 2021-01-27 19:34:02 -08:00
popen.c Polish recent changes and make improvements 2022-03-19 03:37:00 -07:00
printf.c Make improvements 2022-04-24 10:06:05 -07:00
putc.c Add raw memory visualization tool to redbean 2022-05-14 04:33:58 -07:00
putchar.c Add raw memory visualization tool to redbean 2022-05-14 04:33:58 -07:00
puts.c Make major improvements to stdio 2021-03-26 22:31:41 -07:00
putwc.c Add raw memory visualization tool to redbean 2022-05-14 04:33:58 -07:00
putwchar.c Add raw memory visualization tool to redbean 2022-05-14 04:33:58 -07:00
rewind.c Make major improvements to stdio 2021-03-26 22:31:41 -07:00
scanf.c Change license 2020-12-27 17:18:44 -08:00
setbuf.c Make major improvements to stdio 2021-03-26 22:31:41 -07:00
setbuffer.c Make major improvements to stdio 2021-03-26 22:31:41 -07:00
setlinebuf.c Make major improvements to stdio 2021-03-26 22:31:41 -07:00
setvbuf.c Reduce memory needed by ASAN morgue 2021-08-19 09:34:24 -07:00
spawn.c Make improvements 2022-04-28 09:57:07 -07:00
spawn.h Improve system call polyfills 2021-03-08 10:07:02 -08:00
spawna.c Add posix_spawn (#114) 2021-03-07 20:14:07 -08:00
spawna.internal.h Add posix_spawn (#114) 2021-03-07 20:14:07 -08:00
spawnf.c Improve LLVM compatibility a little bit 2021-05-16 20:34:46 -07:00
spawnp.c Make improvements 2022-04-28 09:57:07 -07:00
stdbuf.c Make major improvements to stdio 2021-03-26 22:31:41 -07:00
stderr-init.S Clean old .source directive out of asm code 2022-03-18 12:43:21 -07:00
stderr.c Remove more nonstandard stuff from cosmopolitan.h 2021-03-01 00:18:23 -08:00
stdin-init.S Clean old .source directive out of asm code 2022-03-18 12:43:21 -07:00
stdin.c Remove more nonstandard stuff from cosmopolitan.h 2021-03-01 00:18:23 -08:00
stdio.h Add raw memory visualization tool to redbean 2022-05-14 04:33:58 -07:00
stdio.mk Add function for creating hex string literals 2021-08-07 07:05:19 -07:00
stdio_ext.h Work towards improving signals and processes 2021-01-27 19:34:02 -08:00
stdout-init.S Clean old .source directive out of asm code 2022-03-18 12:43:21 -07:00
stdout.c Add SNI support to redbean and improve SSL perf 2021-07-23 13:56:13 -07:00
system.c Improve redbean 2022-04-25 08:30:14 -07:00
systemexec.c Make improvements 2022-04-28 09:57:07 -07:00
temp.h Import C++ Standard Template Library 2022-03-22 06:41:54 -07:00
tmpfile.c Add syscalls to Blinkenlights and fix bugs 2022-05-13 13:31:21 -07:00
ungetc.c Add raw memory visualization tool to redbean 2022-05-14 04:33:58 -07:00
ungetwc.c Add raw memory visualization tool to redbean 2022-05-14 04:33:58 -07:00
vappendf.c Add function for creating hex string literals 2021-08-07 07:05:19 -07:00
vfprintf.c Add raw memory visualization tool to redbean 2022-05-14 04:33:58 -07:00
vfscanf.c Change license 2020-12-27 17:18:44 -08:00
vprintf.c Change license 2020-12-27 17:18:44 -08:00
vscanf.c Change license 2020-12-27 17:18:44 -08:00