Mint APE Loader v1.7

This change reduces the memory requirements of your APE Loader by 10x,
in terms of virtual memory size, thanks to the help of alloca(). We're
also now creating argument blocks with the same layout across systems.
This commit is contained in:
Justine Tunney 2023-08-17 07:21:13 -07:00
parent d967a94c9a
commit 1d8937d528
No known key found for this signature in database
GPG key ID: BE714B4575D6E328
31 changed files with 367 additions and 656 deletions

View file

@ -23,6 +23,7 @@
#include "libc/intrin/asan.internal.h"
#include "libc/intrin/describeflags.internal.h"
#include "libc/intrin/strace.internal.h"
#include "libc/macros.internal.h"
#include "libc/sysv/consts/rlimit.h"
#include "libc/sysv/errfuns.h"
@ -31,6 +32,12 @@
*
* The following resources are recommended:
*
* - `RLIMIT_STACK` controls how much stack memory is available to the
* main thread. This setting is inherited across fork() and execve()
* Please note it's only safe for Cosmopolitan programs, to set this
* value to at least `PTHREAD_STACK_MIN * 2`. On Windows this cannot
* be used to extend the stack, which is currently hard-coded.
*
* - `RLIMIT_AS` limits the size of the virtual address space. This will
* work on all platforms except WSL. It is emulated on XNU and Windows
* which means it won't propagate across execve() currently.