Use better memory strategy on Windows

Rather than using the the rollo global to pick addresses, we select them
randomly now using a conservative vaspace.
This commit is contained in:
Justine Tunney 2024-07-20 02:20:03 -07:00
parent 6a5d4ed65b
commit 2018cac11f
No known key found for this signature in database
GPG key ID: BE714B4575D6E328
13 changed files with 113 additions and 124 deletions

View file

@ -82,6 +82,8 @@ TEST(madvise, subPages) {
}
TEST(madvise, madvWillNeed_unmappedRegion) {
if (IsWindows())
return; // needs carving
char *p;
ASSERT_NE(MAP_FAILED, (p = mmap(0, getgransize() * 3, PROT_READ | PROT_WRITE,
MAP_PRIVATE | MAP_ANONYMOUS, -1, 0)));
@ -96,6 +98,8 @@ TEST(madvise, madvWillNeed_unmappedRegion) {
}
TEST(madvise, madvFree_unmappedRegion) {
if (IsWindows())
return; // needs carving
char *p;
ASSERT_NE(MAP_FAILED, (p = mmap(0, getgransize() * 3, PROT_READ | PROT_WRITE,
MAP_PRIVATE | MAP_ANONYMOUS, -1, 0)));