Commit 58bb710f authored by Kunshan Wang's avatar Kunshan Wang

Fixed a bug which improperly aborts defragmentation.

Also changed the default memory size to 1GiB for bigger applications.
parent bcb40c0c
...@@ -5,7 +5,7 @@ import java.nio.ByteBuffer ...@@ -5,7 +5,7 @@ import java.nio.ByteBuffer
import uvm.ssavariables.AtomicRMWOptr._ import uvm.ssavariables.AtomicRMWOptr._
object MemorySupport { object MemorySupport {
val MEMORY_SIZE: Word = 64L * 1024L * 1024L val MEMORY_SIZE: Word = 1024L * 1024L * 1024L
val bb: ByteBuffer = ByteBuffer.allocateDirect(MEMORY_SIZE.toInt) val bb: ByteBuffer = ByteBuffer.allocateDirect(MEMORY_SIZE.toInt)
bb.order(java.nio.ByteOrder.LITTLE_ENDIAN) bb.order(java.nio.ByteOrder.LITTLE_ENDIAN)
......
...@@ -13,7 +13,7 @@ object SimpleImmixDefragMutator { ...@@ -13,7 +13,7 @@ object SimpleImmixDefragMutator {
} }
class SimpleImmixDefragMutator(val heap: SimpleImmixHeap, val space: SimpleImmixSpace) class SimpleImmixDefragMutator(val heap: SimpleImmixHeap, val space: SimpleImmixSpace)
extends Mutator with Allocator { extends Mutator with Allocator {
import SimpleImmixDefragMutator._ import SimpleImmixDefragMutator._
...@@ -55,7 +55,7 @@ class SimpleImmixDefragMutator(val heap: SimpleImmixHeap, val space: SimpleImmix ...@@ -55,7 +55,7 @@ class SimpleImmixDefragMutator(val heap: SimpleImmixHeap, val space: SimpleImmix
logger.debug("got new reserved block.") logger.debug("got new reserved block.")
if (curBlockAddr == None) { if (curBlockAddr == None) {
logger.debug("No more reserved blocks. Cannot defragment.") logger.debug("No more reserved blocks. Cannot defragment.")
return 0 throw new NoMoreDefragBlockException("No more blocks for defrag.")
} else { } else {
None None
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment