mirror of
https://github.com/jart/cosmopolitan.git
synced 2025-06-28 07:18:30 +00:00
Revert "Rewrite ZipOS"
This reverts commit b01282e23e
. Some tests
are broken. It's not clear how it'll impact metal yet. Let's revisit the
memory optimization benefits of this change again sometime soon.
This commit is contained in:
parent
ee8a861635
commit
ff250a0c10
21 changed files with 420 additions and 407 deletions
|
@ -28,14 +28,9 @@
|
|||
#include "libc/sysv/consts/rlim.h"
|
||||
#include "libc/sysv/consts/rlimit.h"
|
||||
|
||||
// Hack for guessing the unknowable boundaries of _start()'s stack
|
||||
// Hack for guessing boundaries of _start()'s stack
|
||||
//
|
||||
// This code always guesses correctly on Windows because WinMain()
|
||||
// is written to allocate a stack ourself. Local testing on Linux,
|
||||
// XNU, FreeBSD, OpenBSD, and NetBSD says that accuracy is ±1 page
|
||||
// and that error rate applies to both beginning and end addresses
|
||||
//
|
||||
// Every UNIX system in our support vector creates arg blocks like
|
||||
// Every UNIX system in our support vector creates arg blocks like:
|
||||
//
|
||||
// <HIGHEST-STACK-ADDRESS>
|
||||
// last environ string
|
||||
|
@ -60,6 +55,11 @@
|
|||
// up to the microprocessor page size (this computes the top addr)
|
||||
// and the bottom is computed by subtracting RLIMIT_STACK rlim_cur
|
||||
// It's simple but gets tricky if we consider environ can be empty
|
||||
//
|
||||
// This code always guesses correctly on Windows because WinMain()
|
||||
// is written to allocate a stack ourself. Local testing on Linux,
|
||||
// XNU, FreeBSD, OpenBSD, and NetBSD says that accuracy is ±1 page
|
||||
// and that error rate applies to both beginning and end addresses
|
||||
|
||||
static char *__get_last(char **list) {
|
||||
char *res = 0;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue