mirror of
https://github.com/jart/cosmopolitan.git
synced 2025-01-31 19:43:32 +00:00
db33973e0a
This is done without using Microsoft's internal APIs. MAP_PRIVATE mappings are copied to the subprocess via a pipe, since Microsoft doesn't want us to have proper COW pages. MAP_SHARED mappings are remapped without needing to do any copying. Global variables need copying along with the stack and the whole heap of anonymous mem. This actually improves the reliability of the redbean http server although one shouldn't expect 10k+ connections on a home computer that isn't running software built to serve like Linux or FreeBSD.
12 lines
228 B
ArmAsm
12 lines
228 B
ArmAsm
.include "o/libc/nt/codegen.inc"
|
|
.imp user32,__imp_LoadImageW,LoadImageW,2105
|
|
|
|
.text.windows
|
|
LoadImage:
|
|
push %rbp
|
|
mov %rsp,%rbp
|
|
.profilable
|
|
mov __imp_LoadImageW(%rip),%rax
|
|
jmp __sysv2nt6
|
|
.endfn LoadImage,globl
|
|
.previous
|