|
29 | 29 |
|
30 | 30 | import org.graalvm.word.UnsignedWord;
|
31 | 31 |
|
| 32 | +import com.oracle.svm.core.SubstrateOptions; |
32 | 33 | import com.oracle.svm.core.SubstrateUtil;
|
33 | 34 | import com.oracle.svm.core.config.ConfigurationValues;
|
34 | 35 | import com.oracle.svm.core.genscavenge.ChunkedImageHeapAllocator.AlignedChunk;
|
@@ -84,7 +85,7 @@ public ChunkedImageHeapLayouter(ImageHeapInfo heapInfo, long startOffset) {
|
84 | 85 | this.partitions[READ_ONLY_RELOCATABLE] = new ChunkedImageHeapPartition("readOnlyRelocatable", false, false, alignment, alignment);
|
85 | 86 | this.partitions[WRITABLE_REGULAR] = new ChunkedImageHeapPartition("writable", true, false, alignment, alignment);
|
86 | 87 | this.partitions[WRITABLE_HUGE] = new ChunkedImageHeapPartition("writableHuge", true, true, alignment, alignment);
|
87 |
| - this.partitions[READ_ONLY_HUGE] = new ChunkedImageHeapPartition("readOnlyHuge", false, true, alignment, alignment); |
| 88 | + this.partitions[READ_ONLY_HUGE] = new ChunkedImageHeapPartition("readOnlyHuge", false, true, alignment, SubstrateOptions.getPageSize()); |
88 | 89 |
|
89 | 90 | this.heapInfo = heapInfo;
|
90 | 91 | this.startOffset = startOffset;
|
@@ -140,6 +141,7 @@ public ImageHeapLayoutInfo layout(ImageHeap imageHeap, int pageSize) {
|
140 | 141 | assert partition.getStartOffset() % partition.getStartAlignment() == 0 : partition;
|
141 | 142 | assert (partition.getStartOffset() + partition.getSize()) % partition.getEndAlignment() == 0 : partition;
|
142 | 143 | }
|
| 144 | + assert layoutInfo.getImageHeapSize() % pageSize == 0 : "Image heap size is not a multiple of page size"; |
143 | 145 | return layoutInfo;
|
144 | 146 | }
|
145 | 147 |
|
|
0 commit comments