Skip to content
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
Change CoreClrLibrarySize and MaxExecutableMemorySize on arm
  • Loading branch information
EgorBo committed Jan 16, 2022
commit 90e4d8e92f5bd6797dc1023e5098738c3da2f3fc
6 changes: 6 additions & 0 deletions src/coreclr/pal/src/include/pal/virtual.h
Original file line number Diff line number Diff line change
Expand Up @@ -180,6 +180,7 @@ class ExecutableMemoryAllocator
int32_t GenerateRandomStartOffset();

private:
#ifdef TARGET_XARCH
// There does not seem to be an easy way find the size of a library on Unix.
// So this constant represents an approximation of the libcoreclr size (on debug build)
// that can be used to calculate an approximate location of the memory that
Expand All @@ -191,6 +192,11 @@ class ExecutableMemoryAllocator
// will try to reserve during initialization. We want all JIT-ed code and the
// entire libcoreclr to be located in a 2GB range.
static const int32_t MaxExecutableMemorySize = 0x7FFF0000;
#else
static const int32_t CoreClrLibrarySize = 16 * 1024 * 1024;
static const int32_t MaxExecutableMemorySize = 128 * 1024 * 1024;
#endif

static const int32_t MaxExecutableMemorySizeNearCoreClr = MaxExecutableMemorySize - CoreClrLibrarySize;

// Start address of the reserved virtual address space
Expand Down