Fix fork thread handle leak on windows

This commit is contained in:
Justine Tunney 2025-01-02 19:09:57 -08:00
parent a15958edc6
commit 538ce338f4
No known key found for this signature in database
GPG key ID: BE714B4575D6E328
3 changed files with 3 additions and 4 deletions

View file

@ -24,7 +24,6 @@
#include "libc/dce.h"
#include "libc/intrin/describebacktrace.h"
#include "libc/intrin/dll.h"
#include "libc/intrin/kprintf.h"
#include "libc/intrin/maps.h"
#include "libc/macros.h"
#include "libc/nexgen32e/rdtsc.h"
@ -92,7 +91,7 @@ void __maps_init(void) {
// https://lwn.net/Articles/725832/. if we guess too small, then
// slackmap will create a bunch of zombie stacks in __print_maps
// to coverup the undisclosed memory but no cost if we guess big
size_t guardsize = (__maps.rand % 8 + 1) * 1000 * 1024;
size_t guardsize = 1024 * 1024;
guardsize += __pagesize - 1;
guardsize &= -__pagesize;