Skip to content

Commit

Permalink
Fix for 6K Retina
Browse files Browse the repository at this point in the history
  • Loading branch information
kanjitalk755 committed Dec 16, 2023
1 parent e059b64 commit 1ddb7d3
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions BasiliskII/src/CrossPlatform/vm_alloc.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@
#include <stdlib.h>
#include <string.h>
#include <limits.h>
#include <assert.h>
#include "vm_alloc.h"

#if defined(__APPLE__) && defined(__MACH__)
Expand Down Expand Up @@ -223,10 +224,11 @@ void vm_exit(void)
}

static void *reserved_buf;
static const size_t RESERVED_SIZE = 64 * 1024 * 1024; // for 5K Retina
static const size_t RESERVED_SIZE = 80 * 1024 * 1024; // for 6K Retina

void *vm_acquire_reserved(size_t size) {
return reserved_buf && size <= RESERVED_SIZE ? reserved_buf : VM_MAP_FAILED;
assert(reserved_buf && size <= RESERVED_SIZE);
return reserved_buf;
}

int vm_init_reserved(void *hostAddress) {
Expand Down

0 comments on commit 1ddb7d3

Please sign in to comment.