Make mappings unlimited on NT

This change might also fix fork() in certain cases on NT.
This commit is contained in:
Justine Tunney 2021-09-04 13:20:47 -07:00
parent ab64c746cc
commit 34b68f1945
31 changed files with 356 additions and 127 deletions

View file

@ -1,2 +1,12 @@
.include "o/libc/nt/codegen.inc"
.imp kernel32,__imp_GlobalAlloc,GlobalAlloc,0
.text.windows
GlobalAlloc:
push %rbp
mov %rsp,%rbp
.profilable
mov __imp_GlobalAlloc(%rip),%rax
jmp __sysv2nt
.endfn GlobalAlloc,globl
.previous

View file

@ -1,2 +1,15 @@
.include "o/libc/nt/codegen.inc"
.imp kernel32,__imp_GlobalFree,GlobalFree,0
.text.windows
GlobalFree:
push %rbp
mov %rsp,%rbp
.profilable
mov %rdi,%rcx
sub $32,%rsp
call *__imp_GlobalFree(%rip)
leave
ret
.endfn GlobalFree,globl
.previous