mirror of
https://github.com/jart/cosmopolitan.git
synced 2025-05-23 13:52:28 +00:00
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.
This commit is contained in:
parent
578cb21591
commit
80b211e314
106 changed files with 1483 additions and 592 deletions
2
third_party/sqlite3/os_unix.c
vendored
2
third_party/sqlite3/os_unix.c
vendored
|
@ -317,6 +317,7 @@ static pid_t randomnessPid = 0;
|
|||
#define threadid 0
|
||||
#endif
|
||||
|
||||
#if 0
|
||||
/*
|
||||
** HAVE_MREMAP defaults to true on Linux and false everywhere else.
|
||||
*/
|
||||
|
@ -327,6 +328,7 @@ static pid_t randomnessPid = 0;
|
|||
# define HAVE_MREMAP 0
|
||||
# endif
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifdef __linux__
|
||||
/*
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue