Skip to content

Commit 23770fc

Browse files
rmacnak-googlecommit-bot@chromium.org
authored andcommitted
[vm, gc] Increase HeapPage size to 512k; increase max heap size to 32GB.
Change-Id: I0d5649d37a73caea39d3f703f429a4af7b4c29c5 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/113950 Commit-Queue: Ryan Macnak <[email protected]> Reviewed-by: Vyacheslav Egorov <[email protected]> Reviewed-by: Siva Annamalai <[email protected]>
1 parent e68ca9b commit 23770fc

2 files changed

Lines changed: 4 additions & 4 deletions

File tree

runtime/vm/globals.h

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,10 +37,11 @@ const intptr_t kBytesPerBigIntDigit = 4;
3737

3838
// The default old gen heap size in MB, where 0 == unlimited.
3939
// 32-bit: OS limit is 2 or 3 GB
40-
// 64-bit: OS limit is 2^16 page table entries * 256 KB HeapPages = 16 GB
40+
// 64-bit: Linux's limit is
41+
// sysctl vm.max_map_count (default 2^16) * 512 KB HeapPages = 32 GB
4142
// Set the VM limit below the OS limit to increase the likelihood of failing
4243
// gracefully with a Dart OutOfMemory exception instead of SIGABORT.
43-
const intptr_t kDefaultMaxOldGenHeapSize = (kWordSize <= 4) ? 1536 : 15360;
44+
const intptr_t kDefaultMaxOldGenHeapSize = (kWordSize <= 4) ? 1536 : 30720;
4445

4546
#define kPosInfinity bit_cast<double>(DART_UINT64_C(0x7ff0000000000000))
4647
#define kNegInfinity bit_cast<double>(DART_UINT64_C(0xfff0000000000000))

runtime/vm/heap/pages.h

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,7 @@ class ObjectSet;
2626
class ForwardingPage;
2727
class GCMarker;
2828

29-
// TODO(iposva): Determine heap sizes and tune the page size accordingly.
30-
static const intptr_t kPageSize = 256 * KB;
29+
static const intptr_t kPageSize = 512 * KB;
3130
static const intptr_t kPageSizeInWords = kPageSize / kWordSize;
3231
static const intptr_t kPageMask = ~(kPageSize - 1);
3332

0 commit comments

Comments
 (0)