[rvm-research] [PATCH] enlarge org.mmtk.utility.heap.layout.Mmapper()'s second
Lingyu Zhu <[email protected]> Wed, 6 Dec 2017 10:50:45 +0800
| Newsgroups | gmane.comp.java.jikes.rvm.devel |
|---|---|
| Message-ID | <CACFGcbZndSvjEX2VFYjL4HNUEuM13xkHNHnTxR759f3BvoBHnw@mail.gmail.com> |
This method's second parameter 'pages' is of type int, which can not fit
64-bit VM.
---
MMTk/src/org/mmtk/policy/Space.java | 2 +-
MMTk/src/org/mmtk/utility/heap/layout/ByteMapMmapper.java | 2 +-
MMTk/src/org/mmtk/utility/heap/layout/FragmentedMmapper.java | 2 +-
MMTk/src/org/mmtk/utility/heap/layout/Mmapper.java | 2 +-
4 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/MMTk/src/org/mmtk/policy/Space.java
b/MMTk/src/org/mmtk/policy/Space.java
index cddf3a8..c9bca2c 100644
--- a/MMTk/src/org/mmtk/policy/Space.java
+++ b/MMTk/src/org/mmtk/policy/Space.java
@@ -653,7 +653,7 @@ public abstract class Space {
Log.write("->");
Log.writeln(space.start.plus(space.extent.minus(1)));
}
- HeapLayout.mmapper.ensureMapped(space.start, space.extent.toInt()
>> LOG_BYTES_IN_PAGE);
+ HeapLayout.mmapper.ensureMapped(space.start, space.extent.toLong()
>> LOG_BYTES_IN_PAGE);
}
}
}
diff --git a/MMTk/src/org/mmtk/utility/heap/layout/ByteMapMmapper.java
b/MMTk/src/org/mmtk/utility/heap/layout/ByteMapMmapper.java
index bfba4c1..6c75a02 100644
--- a/MMTk/src/org/mmtk/utility/heap/layout/ByteMapMmapper.java
+++ b/MMTk/src/org/mmtk/utility/heap/layout/ByteMapMmapper.java
@@ -136,7 +136,7 @@ public final class ByteMapMmapper extends Mmapper {
* @param pages The size of the range to be mapped, in pages
*/
@Override
- public void ensureMapped(Address start, int pages) {
+ public void ensureMapped(Address start, long pages) {
int startChunk = addressToMmapChunksDown(start);
int endChunk =
addressToMmapChunksUp(start.plus(Conversions.pagesToBytes(pages)));
for (int chunk = startChunk; chunk < endChunk; chunk++) {
diff --git a/MMTk/src/org/mmtk/utility/heap/layout/FragmentedMmapper.java
b/MMTk/src/org/mmtk/utility/heap/layout/FragmentedMmapper.java
index 3380d0a..c53a7ba 100644
--- a/MMTk/src/org/mmtk/utility/heap/layout/FragmentedMmapper.java
+++ b/MMTk/src/org/mmtk/utility/heap/layout/FragmentedMmapper.java
@@ -379,7 +379,7 @@ public final class FragmentedMmapper extends Mmapper {
* @param pages The size of the range to be mapped, in pages
*/
@Override
- public void ensureMapped(Address start, int pages) {
+ public void ensureMapped(Address start, long pages) {
if (STATS) mapCounter.inc();
final Address end = start.plus(Conversions.pagesToBytes(pages));
if (VERBOSE) {
diff --git a/MMTk/src/org/mmtk/utility/heap/layout/Mmapper.java
b/MMTk/src/org/mmtk/utility/heap/layout/Mmapper.java
index 886dd85..dd70efc 100644
--- a/MMTk/src/org/mmtk/utility/heap/layout/Mmapper.java
+++ b/MMTk/src/org/mmtk/utility/heap/layout/Mmapper.java
@@ -59,7 +59,7 @@ public abstract class Mmapper {
* @param start The start of the range to be mapped.
* @param pages The size of the range to be mapped, in pages
*/
- public abstract void ensureMapped(Address start, int pages);
+ public abstract void ensureMapped(Address start, long pages);
/**
* Is the page occupied by this object mapped ?
--
2.7.4
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Jikesrvm-researchers mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jikesrvm-researchers